Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_admin
  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 to allow users edit their own profile.
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_admin
  17.  * @since       1.6
  18.  */
  19. class AdminViewProfile extends JViewLegacy
  20. {
  21.     protected $form;
  22.  
  23.     protected $item;
  24.  
  25.     protected $state;
  26.  
  27.     /**
  28.      * Display the view
  29.      */
  30.     public function display($tpl null)
  31.     {
  32.         $this->form            = $this->get('Form');
  33.         $this->item            = $this->get('Item');
  34.         $this->state        = $this->get('State');
  35.  
  36.         // Check for errors.
  37.         if (count($errors $this->get('Errors')))
  38.         {
  39.             JError::raiseError(500implode("\n"$errors));
  40.             return false;
  41.         }
  42.  
  43.         $this->form->setValue('password',    null);
  44.         $this->form->setValue('password2',    null);
  45.  
  46.         parent::display($tpl);
  47.         $this->addToolbar();
  48.     }
  49.  
  50.     /**
  51.      * Add the page title and toolbar.
  52.      *
  53.      * @since   1.6
  54.      */
  55.     protected function addToolbar()
  56.     {
  57.         JFactory::getApplication()->input->set('hidemainmenu'1);
  58.  
  59.         JToolbarHelper::title(JText::_('COM_ADMIN_VIEW_PROFILE_TITLE')'user user-profile');
  60.         JToolbarHelper::apply('profile.apply');
  61.         JToolbarHelper::save('profile.save');
  62.         JToolbarHelper::cancel('profile.cancel''JTOOLBAR_CLOSE');
  63.         JToolbarHelper::divider();
  64.         JToolbarHelper::help('JHELP_ADMIN_USER_PROFILE_EDIT');
  65.     }
  66. }

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