PHPFusion\QuantumFields::load_fields PHP Method

load_fields() public method

public load_fields ( )
    public function load_fields()
    {
        $this->page = dbquery_tree_full($this->category_db, "field_cat_id", "field_parent", "ORDER BY field_cat_order ASC");
        $result = dbquery("\n        SELECT field.*,\n        cat.field_cat_id, cat.field_cat_name, cat.field_parent, cat.field_cat_class,\n\t\troot.field_cat_id as page_id, root.field_cat_name as page_name, root.field_cat_db, root.field_cat_index FROM\n\t\t" . $this->field_db . " field\n\t\tLEFT JOIN " . $this->category_db . " cat on (cat.field_cat_id = field.field_cat)\n\t\tLEFT JOIN " . $this->category_db . " root on (root.field_cat_id = cat.field_parent)\n\t\tORDER BY cat.field_cat_order ASC, field.field_order ASC\n\t\t");
        $this->max_rows = dbrows($result);
        if ($this->max_rows > 0) {
            while ($data = dbarray($result)) {
                $this->fields[$data['field_cat']][] = $data;
            }
        }
    }