protected function _formatNode($row)
 {
     $component = $row->getData();
     $data = parent::_formatNode($row);
     $data['uiProvider'] = 'Kwf.Component.PagesNode';
     $nodeConfig = $this->_getNodeConfig($component);
     if (is_null($nodeConfig)) {
         return null;
     }
     $data = array_merge($data, $nodeConfig);
     $icon = $data['icon'];
     if (is_string($icon)) {
         $icon = new Kwf_Asset($icon);
     }
     $data['bIcon'] = $icon->toString($data['iconEffects']);
     if (isset($data['icon'])) {
         unset($data['icon']);
     }
     if (!$data['expanded']) {
         $openedNodes = $this->_saveSessionNodeOpened(null, null);
         if ($data['disabled'] && !array_key_exists($row->id, $openedNodes)) {
             $data['expanded'] = true;
         }
     }
     if ($data['loadChildren'] || $data['expanded'] || $data['disabled']) {
         $data['children'] = $this->_formatNodes($component->componentId);
     }
     return $data;
 }
 protected function _getSelect()
 {
     $ret = parent::_getSelect();
     $ret->whereEquals('component_id', $this->_getParam('componentId'));
     $ret->whereEquals('visible', 1);
     return $ret;
 }
 protected function _formatNode($row)
 {
     $data = parent::_formatNode($row);
     if ($row->class == 'root') {
         $icon = 'root';
         /*NOT PORTED to flags
           } else if (is_instance_of($row->class, 'Kwf_Component_Generator_Box_Interface')) {
               $icon = 'box';
           } else if (is_instance_of($row->class, 'Kwf_Component_Generator_Page_Interface')) {
               $icon = 'page';
           */
     } else {
         $icon = 'component';
     }
     $data['expanded'] = $row->class == 'root';
     $data['bIcon'] = $this->_icons[$icon]->__toString();
     $data['text'] .= ': ' . $row->name;
     return $data;
 }
 public function indexAction()
 {
     $this->view->assetsPackage = new Kwf_Assets_Package_TestPackage('Kwf_AutoTree');
     $this->view->viewport = 'Kwf.Test.Viewport';
     parent::indexAction();
 }
示例#5
0
 public function indexAction()
 {
     parent::indexAction();
     $this->view->apply(Kwc_Admin::getInstance($this->_getParam('class'))->getExtConfig());
 }