Esempio n. 1
0
 function manager($params)
 {
     $sets = array();
     $sets_types = array();
     $pset_select_list = array('BOOL', 'DATE', 'ICURRENCY', 'CURRENCY', 'CURRENCY', 'FIELD', 'IMAGE', 'FILE', 'IFOLDER');
     $this->result['columns'] = array();
     $struct = $this->_tree->GetNodeStruct($params['ancestor']);
     if ($struct['obj_type'] == '_CATOBJ') {
         $params['ancestor'] = $this->_tree->GetAncestor($params['ancestor']);
     }
     $childs = $this->_tree->GetChildsParam($params['ancestor'], '%', true, null, 'ASC');
     while (list($k, $v) = each($childs)) {
         if (!is_array($sets[$v['params']['Property_set']])) {
             if ($property_set = $this->_common_obj->get_properties($v['params']['Property_set'])) {
                 foreach ($property_set as $pkey => $pset) {
                     if (in_array($pset['params']['Type'], $pset_select_list)) {
                         $cpset[$pkey] = $pset['params'];
                         $sets_types[$pset['params']['Name']] = $pset['params']['Type'];
                     }
                 }
             }
             $sets[$v['params']['Property_set']] = $cpset;
         }
         $objects[$k] = $this->property_set_to_properties_manager($v['params']['Property_set'], $v['params'], $sets_types);
         $objects[$k] = array('obj_type' => $childs[$k]['obj_type'], 'Name' => $v['params']['Name']) + $objects[$k];
     }
     foreach ($sets as $pset) {
         XARRAY::array_merge_plus($this->result['columns'], $pset);
     }
     $this->result['data_set'] = $this->gridformat($objects);
 }