Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  com_weblinks
  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.  * Content categories view.
  14.  *
  15.  * @package     Joomla.Site
  16.  * @subpackage  com_weblinks
  17.  * @since       1.5
  18.  */
  19. {
  20.     protected $item = null;
  21.  
  22.     /**
  23.      * @var    string  Default title to use for page title
  24.      * @since  3.2
  25.      */
  26.     protected $defaultPageTitle = 'COM_WEBLINKS_DEFAULT_PAGE_TITLE';
  27.  
  28.     /**
  29.      * @var    string  The name of the extension for the category
  30.      * @since  3.2
  31.      */
  32.     protected $extension = 'com_weblinks';
  33.  
  34.     /**
  35.      * @var    string  The name of the view to link individual items to
  36.      * @since  3.2
  37.      */
  38.     protected $viewName = 'weblink';
  39.  
  40.     /**
  41.      * Execute and display a template script.
  42.      *
  43.      * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  44.      *
  45.      * @return  mixed  A string if successful, otherwise a Error object.
  46.      */
  47.     public function display($tpl null)
  48.     {
  49.         $state        $this->get('State');
  50.         $items        $this->get('Items');
  51.         $parent        $this->get('Parent');
  52.  
  53.         // Check for errors.
  54.         if (count($errors $this->get('Errors')))
  55.         {
  56.             JError::raiseWarning(500implode("\n"$errors));
  57.             return false;
  58.         }
  59.  
  60.         if ($items === false)
  61.         {
  62.             return JError::raiseError(404JText::_('JGLOBAL_CATEGORY_NOT_FOUND'));
  63.         }
  64.  
  65.         if ($parent == false)
  66.         {
  67.             return JError::raiseError(404JText::_('JGLOBAL_CATEGORY_NOT_FOUND'));
  68.         }
  69.  
  70.         $params &$state->params;
  71.  
  72.         $items array($parent->id => $items);
  73.  
  74.         // Escape strings for HTML output
  75.         $this->pageclass_sfx htmlspecialchars($params->get('pageclass_sfx'));
  76.  
  77.         $this->maxLevelcat $params->get('maxLevelcat'-1);
  78.         $this->params &$params;
  79.         $this->parent &$parent;
  80.         $this->items  = &$items;
  81.  
  82.         return parent::display($tpl);
  83.     }
  84. }

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