コード例 #1
0
ファイル: ilink.php プロジェクト: jicheng17/comanova
 function __construct($component, $id = null, $menutype = null)
 {
     parent::__construct();
     if ($id) {
         $this->_cid = "&cid[]=" . $id;
     } else {
         $this->_cid = null;
     }
     if ($menutype) {
         $this->_menutype = "&menutype=" . $menutype;
     } else {
         $this->_menutype = null;
     }
     $this->_com = preg_replace('#\\W#', '', $component);
     // Build the tree
     if (!$this->_getOptions($this->_getXML(JPATH_SITE . '/components/com_' . $this->_com . '/metadata.xml', 'menu'), $this->_root)) {
         if (!$this->_getViews()) {
             // Default behavior
         }
     }
 }