Beispiel #1
0
 function &getExpansion()
 {
     $item =& $this->getItem();
     $return['option'] = JRequest::getCmd('expand');
     $menutype = JRequest::getVar('menutype', '', '', 'menutype');
     if ($return['option']) {
         require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_menus' . DS . 'classes' . DS . 'ilink.php';
         $option = $return['option'];
         if ($option == 'articles') {
             $option = 'content';
         } else {
             if ($option == 'contacts') {
                 $option = 'contact';
             }
         }
         $handler = new iLink($option, $item->id, $menutype);
         $return['html'] = $handler->getTree();
         return $return;
     } else {
         $return['html'] = null;
     }
     return $return;
 }
Beispiel #2
0
 function &getExpansion()
 {
     $item =& $this->getItem();
     $return['option'] = JRequest::getCmd('expand');
     $menutype = JRequest::getString('menutype');
     if ($return['option']) {
         require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_menus' . DS . 'classes' . DS . 'ilink.php';
         $handler = new iLink($return['option'], $item->id, $menutype);
         $return['html'] = $handler->getTree();
         return $return;
     } else {
         $return['html'] = null;
     }
     return $return;
 }
Beispiel #3
0
 function _getLayouts(&$list)
 {
     require_once JPATH_ADMINISTRATOR . '/components/com_javoice/views/customtmpl/tmpl/ilink.php';
     $handler = new iLink('javoice', '', '');
     $return = false;
     $path = JPATH_SITE . '/components/com_javoice/views';
     if (JFolder::exists($path)) {
         $views = JFolder::folders($path);
     } else {
         return $return;
     }
     if (is_array($views) && count($views)) {
         //$this->addChild(new iLinkNode('Views', null, 'Select the view'), true);
         $return = true;
         foreach ($views as $k => $view) {
             if (strpos($view, '_') === false) {
                 // Load view metadata if it exists
                 $xmlpath = $path . '/' . $view . '/metadata.xml';
                 if (JFile::exists($xmlpath)) {
                     $data = $handler->_getXML($xmlpath, 'view');
                 } else {
                     $data = null;
                 }
                 //$url = 'url[option]=com_'.$this->_com.'&url[view]='.$view;
                 if ($data) {
                     if ($data->attributes('hidden') != 'true') {
                         $m = $data->getElementByPath('message');
                         if ($m) {
                             $message = $m->data();
                         }
                         $list[$k]['folder'] = array($data->attributes('title'), $message, $view);
                         $xmlpath = $path . '/' . $view . '/tmpl/metadata.xml';
                         if (JFile::exists($xmlpath)) {
                             $list[$k]['nodes'] = $this->_getXML($xmlpath, 'layout');
                         } else {
                             $list[$k]['nodes'] = null;
                         }
                     }
                 }
             }
         }
     }
     return $list;
 }