Пример #1
0
 public function prepareToolbar()
 {
     $canDo = Helper_Admin::getActions();
     $this->extension = $this->state->get('filter.extension');
     if ($this->extension == 'extension') {
         JToolBarHelper::title(JText::_('COM_CCK_SESSION_MANAGER'), Helper_Admin::getIcon($this->vName));
         return;
     }
     Helper_Session::loadExtensionLang($this->extension);
     JToolBarHelper::title(JText::_('COM_CCK_SESSION_MANAGER') . ' - ' . JText::_($this->extension), Helper_Admin::getIcon($this->vName));
     if ($canDo->get('core.delete')) {
         JToolBarHelper::custom($this->vName . 's' . '.delete', 'delete', 'delete', 'JTOOLBAR_DELETE', true);
     }
     require_once JPATH_ADMINISTRATOR . '/components/com_cck/helpers/toolbar/link.php';
     JToolBar::getInstance('toolbar')->appendButton('CckLink', 'cck-extension', JText::_($this->extension), JRoute::_('index.php?option=' . $this->extension), '_self');
     $this->sidebar = '';
 }
Пример #2
0
 function prepareDisplay()
 {
     $app = JFactory::getApplication();
     $model = $this->getModel();
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->option = $app->input->get('option', '');
     Helper_Session::loadExtensionLang($this->item->extension);
     Helper_Session::loadExtensionLang($this->item->type);
     // Check Errors
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->isNew = @$this->item->id > 0 ? 0 : 1;
     Helper_Admin::addToolbarEdit($this->vName, _C8_TEXT, array('isNew' => $this->isNew, 'folder' => 0, 'checked_out' => ''));
 }