Joomla! PHP Cross Reference Web Portals

Source: /administrator/components/com_installer/views/manage/view.html.php - 124 lines - 3296 bytes - Summary - Text - Print

   1  <?php
   2  /**
   3   * @package     Joomla.Administrator
   4   * @subpackage  com_installer
   5   *
   6   * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
   7   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   8   */
   9  
  10  defined('_JEXEC') or die;
  11  
  12  include_once  __DIR__ . '/../default/view.php';
  13  
  14  /**
  15   * Extension Manager Manage View
  16   *
  17   * @package     Joomla.Administrator
  18   * @subpackage  com_installer
  19   * @since       1.6
  20   */
  21  class InstallerViewManage extends InstallerViewDefault
  22  {
  23      protected $items;
  24  
  25      protected $pagination;
  26  
  27      protected $form;
  28  
  29      protected $state;
  30  
  31      /**
  32       * Display the view
  33       *
  34       * @param   string  $tpl  Template
  35       *
  36       * @return  mixed|void
  37       *
  38       * @since    1.6
  39       */
  40  	public function display($tpl = null)
  41      {
  42          // Get data from the model
  43          $this->state      = $this->get('State');
  44          $this->items      = $this->get('Items');
  45          $this->pagination = $this->get('Pagination');
  46  
  47          // Check for errors.
  48          if (count($errors = $this->get('Errors')))
  49          {
  50              JError::raiseError(500, implode("\n", $errors));
  51              return false;
  52          }
  53  
  54          // Check if there are no matching items
  55          if (!count($this->items))
  56          {
  57              JFactory::getApplication()->enqueueMessage(
  58                  JText::_('COM_INSTALLER_MSG_MANAGE_NOEXTENSION'),
  59                  'warning'
  60              );
  61          }
  62  
  63          // Include the component HTML helpers.
  64          JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
  65  
  66          // Display the view
  67          parent::display($tpl);
  68      }
  69  
  70      /**
  71       * Add the page title and toolbar.
  72       *
  73       * @return  void
  74       *
  75       * @since    1.6
  76       */
  77  	protected function addToolbar()
  78      {
  79          $canDo    = InstallerHelper::getActions();
  80          if ($canDo->get('core.edit.state'))
  81          {
  82              JToolbarHelper::publish('manage.publish', 'JTOOLBAR_ENABLE', true);
  83              JToolbarHelper::unpublish('manage.unpublish', 'JTOOLBAR_DISABLE', true);
  84              JToolbarHelper::divider();
  85          }
  86          JToolbarHelper::custom('manage.refresh', 'refresh', 'refresh', 'JTOOLBAR_REFRESH_CACHE', true);
  87          JToolbarHelper::divider();
  88          if ($canDo->get('core.delete'))
  89          {
  90              JToolbarHelper::deleteList('', 'manage.remove', 'JTOOLBAR_UNINSTALL');
  91              JToolbarHelper::divider();
  92          }
  93  
  94          JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_MANAGE');
  95  
  96          JHtmlSidebar::setAction('index.php?option=com_installer&view=manage');
  97  
  98          JHtmlSidebar::addFilter(
  99              JText::_('COM_INSTALLER_VALUE_CLIENT_SELECT'),
 100              'filter_client_id',
 101              JHtml::_('select.options', array('0' => 'JSITE', '1' => 'JADMINISTRATOR'), 'value', 'text', $this->state->get('filter.client_id'), true)
 102          );
 103  
 104          JHtmlSidebar::addFilter(
 105              JText::_('COM_INSTALLER_VALUE_STATE_SELECT'),
 106              'filter_status',
 107              JHtml::_('select.options', array('0' => 'JDISABLED', '1' => 'JENABLED', '2' => 'JPROTECTED'), 'value', 'text', $this->state->get('filter.status'), true)
 108          );
 109  
 110          JHtmlSidebar::addFilter(
 111              JText::_('COM_INSTALLER_VALUE_TYPE_SELECT'),
 112              'filter_type',
 113              JHtml::_('select.options', InstallerHelper::getExtensionTypes(), 'value', 'text', $this->state->get('filter.type'), true)
 114          );
 115  
 116          JHtmlSidebar::addFilter(
 117              JText::_('COM_INSTALLER_VALUE_FOLDER_SELECT'),
 118              'filter_group',
 119              JHtml::_('select.options', array_merge(InstallerHelper::getExtensionGroupes(), array('*' => JText::_('COM_INSTALLER_VALUE_FOLDER_NONAPPLICABLE'))), 'value', 'text', $this->state->get('filter.group'), true)
 120          );
 121  
 122          parent::addToolbar();
 123      }
 124  }

title

Description

title

Description

title

Description

title

title

Body