public function process_items($items, $data) { $tree_items = isset($data['flat']) && $data['flat'] === false ? $items : Core_Arrays::create_tree($items, $data['create_tree']); $out = array(); $flat_out = array(); $options = isset($data['create_tree']) ? $data['create_tree'] : array(); $options['id_name'] = isset($options['id_name']) ? $options['id_name'] : 'id'; $options['title_name'] = isset($options['title_name']) ? $options['title_name'] : 'title'; $options['childs_name'] = isset($options['childs_name']) ? $options['childs_name'] : 'childs'; $options['disabled_name'] = isset($options['disabled_name']) ? $options['disabled_name'] : 'disabled'; $this->tree_generation($out, $flat_out, $tree_items, $options, $data); $outs = array($out, $flat_out); return $outs; }