Наследование: extends Slim\View
Пример #1
0
 public function display($tpl = null)
 {
     $this->generateToolbar();
     $model = $this->getModel();
     $rows = $this->get('list');
     $pagination = $this->get('pagination');
     $this->assignRef('model', $model);
     $this->assignRef('rows', $rows);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
Пример #2
0
 public function display($tpl = null)
 {
     $this->generateToolbar();
     $model = $this->getModel();
     $row = $this->get('data');
     $return = 'index.php?option=' . $this->option . '&view=keys';
     $this->assignRef('return', $return);
     $this->assignRef('model', $model);
     $this->assignRef('row', $row);
     parent::display($tpl);
 }
Пример #3
0
 public function display($tpl = null)
 {
     if ($this->routeLayout($tpl)) {
         return;
     }
     $this->generateToolbar();
     $views = $this->getMainViews();
     $this->assignRef('views', $views);
     $this->assignRef('modified', $modified);
     parent::display($tpl);
 }
Пример #4
0
 public function display($tpl = null)
 {
     JHTML::stylesheet('com_api.css', 'components/com_api/assets/css/');
     $user = JFactory::getUser();
     $dmodel = JModelLegacy::getInstance('Documentation', 'ApiModel');
     $endpoints = $dmodel->getList();
     $kmodel = JModelLegacy::getInstance('Key', 'ApiModel');
     $tokens = $kmodel->getList();
     $this->endpoints = $endpoints;
     $this->user = $user;
     $this->tokens = $tokens;
     parent::display($tpl);
 }
Пример #5
0
 protected function displayEdit($tpl = null)
 {
     JHTML::script('joomla.javascript.js', 'includes/js/');
     $this->assignRef('return', $_SERVER['HTTP_REFERER']);
     $key = JTable::getInstance('Key', 'ApiTable');
     if ($id = JRequest::getInt('id', 0)) {
         $key->load($id);
         if ($key->user_id != JFactory::getUser()->get('id')) {
             JFactory::getApplication()->redirect($_SERVER['HTTP_REFERER'], JText::_('COM_API_UNAUTHORIZED_EDIT_KEY'));
             return false;
         }
     } elseif (!$this->can_register) {
         JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_api&view=keys'), JText::_('COM_API_UNAUTHORIZED_REGISTER'));
         return false;
     }
     $this->assignRef('key', $key);
     parent::display($tpl);
 }