Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  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.  * Registration view class for Users.
  14.  *
  15.  * @package     Joomla.Site
  16.  * @subpackage  com_users
  17.  * @since       1.5
  18.  */
  19. class UsersViewRemind extends JViewLegacy
  20. {
  21.     protected $form;
  22.  
  23.     protected $params;
  24.  
  25.     protected $state;
  26.  
  27.     /**
  28.      * Method to display the view.
  29.      *
  30.      * @param   string    $tpl    The template file to include
  31.      * @since   1.5
  32.      */
  33.     public function display($tpl null)
  34.     {
  35.         // Get the view data.
  36.         $this->form        = $this->get('Form');
  37.         $this->state    = $this->get('State');
  38.         $this->params    = $this->state->params;
  39.  
  40.         // Check for errors.
  41.         if (count($errors $this->get('Errors')))
  42.         {
  43.             JError::raiseError(500implode('<br />'$errors));
  44.             return false;
  45.         }
  46.  
  47.         // Check for layout override
  48.         $active JFactory::getApplication()->getMenu()->getActive();
  49.         if (isset($active->query['layout']))
  50.         {
  51.             $this->setLayout($active->query['layout']);
  52.         }
  53.  
  54.         //Escape strings for HTML output
  55.         $this->pageclass_sfx htmlspecialchars($this->params->get('pageclass_sfx'));
  56.  
  57.         $this->prepareDocument();
  58.  
  59.         parent::display($tpl);
  60.     }
  61.  
  62.     /**
  63.      * Prepares the document.
  64.      *
  65.      * @since   1.6
  66.      */
  67.     protected function prepareDocument()
  68.     {
  69.         $app        JFactory::getApplication();
  70.         $menus        $app->getMenu();
  71.         $title         null;
  72.  
  73.         // Because the application sets a default page title,
  74.         // we need to get it from the menu item itself
  75.         $menu $menus->getActive();
  76.         if ($menu)
  77.         {
  78.             $this->params->def('page_heading'$this->params->get('page_title'$menu->title));
  79.         }
  80.         else
  81.         {
  82.             $this->params->def('page_heading'JText::_('COM_USERS_REMIND'));
  83.         }
  84.  
  85.         $title $this->params->get('page_title''');
  86.         if (empty($title))
  87.         {
  88.             $title $app->getCfg('sitename');
  89.         }
  90.         elseif ($app->getCfg('sitename_pagetitles'0== 1)
  91.         {
  92.             $title JText::sprintf('JPAGETITLE'$app->getCfg('sitename')$title);
  93.         }
  94.         elseif ($app->getCfg('sitename_pagetitles'0== 2)
  95.         {
  96.             $title JText::sprintf('JPAGETITLE'$title$app->getCfg('sitename'));
  97.         }
  98.         $this->document->setTitle($title);
  99.  
  100.         if ($this->params->get('menu-meta_description'))
  101.         {
  102.             $this->document->setDescription($this->params->get('menu-meta_description'));
  103.         }
  104.  
  105.         if ($this->params->get('menu-meta_keywords'))
  106.         {
  107.             $this->document->setMetadata('keywords'$this->params->get('menu-meta_keywords'));
  108.         }
  109.  
  110.         if ($this->params->get('robots'))
  111.         {
  112.             $this->document->setMetadata('robots'$this->params->get('robots'));
  113.         }
  114.     }
  115. }

Documentation generated on Tue, 19 Nov 2013 15:16:51 +0100 by phpDocumentor 1.4.3