예제 #1
0
파일: Menu.php 프로젝트: ajaboa/crmpuan
 /**
  * # Backend Functionality
  * 
  * Get the tree array for the children of the current item
  * 
  * @return array
  */
 public function getMenuChildrenTree()
 {
     $tree = array();
     $children = $this->children;
     foreach ($children as $child) {
         $hasChildren = $child->hasChildren();
         $childNode = array('id' => $this->site_id . '_menuitem_' . $child->id, 'menu_id' => $this->id, 'menu_item_id' => $child->id, 'cls' => 'site-node-menuitem', 'site_id' => $this->site_id, 'iconCls' => 'go-model-icon-Menuitem', 'text' => $child->label, 'hasChildren' => $hasChildren, 'expanded' => !$hasChildren || \GO\Site\Model\Site::isExpandedNode($this->site_id . '_menu_' . $child->id), 'children' => $hasChildren ? null : $child->getChildrenTree());
         $tree[] = $childNode;
     }
     return $tree;
 }
예제 #2
0
파일: Content.php 프로젝트: ajaboa/crmpuan
 public function getTreeNodeAttributes()
 {
     $hasChildren = $this->hasChildren();
     return array('id' => $this->site_id . '_content_' . $this->id, 'site_id' => $this->site_id, 'content_id' => $this->id, 'slug' => $this->slug, 'cls' => 'site-node-content', 'iconCls' => 'go-model-icon-GO_Site_Model_Content', 'expanded' => !$hasChildren || \GO\Site\Model\Site::isExpandedNode($this->site_id . '_content_' . $this->id), 'hasChildren' => $hasChildren, 'children' => $hasChildren ? $this->getChildrenTree() : array(), 'text' => $this->title, 'qtip' => 'Drag me to the editor to create a link.');
 }