Пример #1
0
 /**
  * Generate admin menu
  * @param array $params
  * @return string
  */
 public function admin(array $params = array())
 {
     if (!isset($params['controller'])) {
         $params['controller'] = $this->_jbrequest->getCtrl();
     }
     $task = $this->_jbrequest->getWord('task');
     if (!isset($params['task']) && !empty($task)) {
         $params['task'] = $task;
     }
     if (!isset($params['option'])) {
         $params['option'] = 'com_zoo';
     }
     return $this->_url($params, true, JURI::root() . 'administrator/index.php');
 }
Пример #2
0
 /**
  * Wrapper for AppView init and rendering
  * @param string $tpl
  */
 protected function renderView($tpl = null)
 {
     $isJoomlaTmpl = $this->_jbrequest->is('tmpl', 'component');
     $ctrl = $this->_jbrequest->getCtrl();
     $task = $this->_jbrequest->getWord('task');
     $path = $this->app->path->path('jbviews:' . $ctrl);
     $view = $this->getView($ctrl);
     // warpper hack
     if (!$isJoomlaTmpl) {
         $jVersion = $this->app->jbversion->joomla('2.7.0') ? '3' : '2';
         echo $view->partial('menu');
         echo '<div class="jbzoo box-bottom joomla-' . $jVersion . '">';
     }
     // render view
     $view->addTemplatePath($path)->setLayout($task)->display($tpl);
     // warpper hack
     if (!$isJoomlaTmpl) {
         echo '</div>';
     }
 }