Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_users
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 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. /**
  13.  * View class for a list of users.
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_users
  17.  * @since       1.6
  18.  */
  19. {
  20.     protected $actions;
  21.  
  22.     protected $items;
  23.  
  24.     protected $pagination;
  25.  
  26.     protected $state;
  27.  
  28.     /**
  29.      * Display the view
  30.      */
  31.     public function display($tpl null)
  32.     {
  33.         // Access check.
  34.         if (!JFactory::getUser()->authorise('core.manage''com_users'|| !JFactory::getConfig()->get('debug'))
  35.         {
  36.             return JError::raiseWarning(404JText::_('JERROR_ALERTNOAUTHOR'));
  37.         }
  38.  
  39.         $this->actions        = $this->get('DebugActions');
  40.         $this->items        = $this->get('Items');
  41.         $this->pagination    = $this->get('Pagination');
  42.         $this->state        = $this->get('State');
  43.         $this->group        $this->get('Group');
  44.         $this->levels        UsersHelperDebug::getLevelsOptions();
  45.         $this->components    UsersHelperDebug::getComponents();
  46.  
  47.         // Check for errors.
  48.         if (count($errors $this->get('Errors')))
  49.         {
  50.             JError::raiseError(500implode("\n"$errors));
  51.             return false;
  52.         }
  53.  
  54.         $this->addToolbar();
  55.         $this->sidebar JHtmlSidebar::render();
  56.         parent::display($tpl);
  57.     }
  58.  
  59.     /**
  60.      * Add the page title and toolbar.
  61.      *
  62.      * @since   1.6
  63.      */
  64.     protected function addToolbar()
  65.     {
  66.         JToolbarHelper::title(JText::sprintf('COM_USERS_VIEW_DEBUG_GROUP_TITLE'$this->group->id$this->group->title)'users groups');
  67.  
  68.         JToolbarHelper::help('JHELP_USERS_DEBUG_GROUPS');
  69.  
  70.         JHtmlSidebar::setAction('index.php?option=com_users&view=debuggroup&user_id=' . (int) $this->state->get('filter.user_id'));
  71.  
  72.         $option '';
  73.         if (!empty($this->components))
  74.         {
  75.             $option JHtml::_('select.options'$this->components'value''text'$this->state->get('filter.component'));
  76.         }
  77.  
  78.         JHtmlSidebar::addFilter(
  79.             JText::_('COM_USERS_OPTION_SELECT_COMPONENT'),
  80.             'filter_component',
  81.             $option
  82.         );
  83.  
  84.         JHtmlSidebar::addFilter(
  85.             JText::_('COM_USERS_OPTION_SELECT_LEVEL_START'),
  86.             'filter_level_start',
  87.             JHtml::_('select.options'$this->levels'value''text'$this->state->get('filter.level_start'))
  88.         );
  89.  
  90.         JHtmlSidebar::addFilter(
  91.             JText::_('COM_USERS_OPTION_SELECT_LEVEL_END'),
  92.             'filter_level_end',
  93.             JHtml::_('select.options'$this->levels'value''text'$this->state->get('filter.level_end'))
  94.         );
  95.     }
  96. }

Documentation generated on Tue, 19 Nov 2013 15:17:37 +0100 by phpDocumentor 1.4.3