protected function get_type($item = null) { $item = $item ? $item : $this->edit_item; if ($item) { return CMS_Vars::type($item->vartype); } return null; }
protected function tree_data_row_extra_fields($entity, $row) { $res = parent::tree_data_row_extra_fields($entity, $row); $type = CMS_Vars::type($entity->vartype); if ($type instanceof CMS_Vars_Types_FieldsType) { $res['edit_parms'] = 'parms/edit/id-' . $entity->id() . '/'; } else { $res['edit_parms'] = $entity->id(); } $res['add'] = $this->action_url('add', null, array('parent_id' => $entity->id())); //$res['expanded'] = $entity->vartype == 'dir'; $res['iconCls'] = 'tao-tree-icon-var-' . strtolower($entity->vartype) . ' tao-tree-icon-var' . ($entity->full ? ' tao-tree-icon-var-full' : ''); $res['vartype'] = $entity->vartype; if (is_bool($this->disbale_drag) && $this->disbale_drag || is_array($this->disbale_drag) && in_array($entity->full_code, $this->disbale_drag)) { $res['allowDrag'] = false; } return $res; }