Exemplo n.º 1
0
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     if ($app->input->getCmd('tmpl', '') == 'component') {
         $this->setLayout('popup');
     }
     $this->model = $this->getModel();
     $this->row = $this->model->getData();
     $this->return = 'index.php?option=' . $this->option . '&view=tutorials';
     $this->setToolBar();
     parent::display($tpl);
 }
Exemplo n.º 2
0
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $this->model = $this->getModel();
     if ($app->input->get('session', 0) && $app->input->getCmd('tmpl', '') == 'component') {
         $session = JFactory::getSession();
         $this->rows = $session->get('helparticles', array(), 'OSToolbar');
         $this->setLayout('popup');
     } else {
         $this->rows = $this->model->getList();
         if ($errors = $this->model->getErrors()) {
             OstoolbarHelper::renderErrors($errors);
         }
     }
     $this->filters = $this->model->getFilters($this->rows);
     $params = JComponentHelper::getParams('com_ostoolbar');
     if (OstoolbarRequest::$isTrial) {
         if ($params->get('api_key')) {
             JFactory::getApplication()->enqueueMessage(JText::_('COM_OSTOOLBAR_API_KEY_INVALID'), 'error');
         }
     }
     $this->setToolBar();
     parent::display($tpl);
 }