Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  com_newsfeeds
  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.  * HTML View class for the Newsfeeds component
  14.  *
  15.  * @package     Joomla.Site
  16.  * @subpackage  com_newsfeeds
  17.  * @since       1.0
  18.  */
  19. {
  20.     /**
  21.      * @var    string  Default title to use for page title
  22.      * @since  3.2
  23.      */
  24.     protected $defaultPageTitle = 'COM_NEWSFEEDS_DEFAULT_PAGE_TITLE';
  25.  
  26.     /**
  27.      * @var    string  The name of the extension for the category
  28.      * @since  3.2
  29.      */
  30.     protected $extension = 'com_newsfeeds';
  31.  
  32.     /**
  33.      * @var    string  The name of the view to link individual items to
  34.      * @since  3.2
  35.      */
  36.     protected $viewName = 'newsfeed';
  37.  
  38.     /**
  39.      * Execute and display a template script.
  40.      *
  41.      * @param   string  $tpl  The name of the template file to parse; automatically searches through the template paths.
  42.      *
  43.      * @return  mixed  A string if successful, otherwise a Error object.
  44.      */
  45.     public function display($tpl null)
  46.     {
  47.         parent::commonCategoryDisplay();
  48.  
  49.         // Prepare the data.
  50.         // Compute the newsfeed slug.
  51.         foreach ($this->items as $item)
  52.         {
  53.             $item->slug    $item->alias ($item->id.':'.$item->alias$item->id;
  54.             $temp        new JRegistry;
  55.             $temp->loadString($item->params);
  56.             $item->params clone($this->params);
  57.             $item->params->merge($temp);
  58.         }
  59.  
  60.         return parent::display($tpl);
  61.     }
  62.  
  63.     /**
  64.      * Prepares the document
  65.      *
  66.      * @return  void 
  67.      */
  68.     protected function prepareDocument()
  69.     {
  70.         parent::prepareDocument();
  71.         $id = (int) @$menu->query['id'];
  72.  
  73.         $menu $this->menu;
  74.  
  75.         if ($menu && ($menu->query['option'!= 'com_newsfeeds' || $menu->query['view'== 'newsfeed' || $id != $this->category->id))
  76.         {
  77.             $path array(array('title' => $this->category->title'link' => ''));
  78.             $category $this->category->getParent();
  79.  
  80.             while (($menu->query['option'!= 'com_newsfeeds' || $menu->query['view'== 'newsfeed' || $id != $category->id&& $category->id 1)
  81.             {
  82.                 $path[array('title' => $category->title'link' => NewsfeedsHelperRoute::getCategoryRoute($category->id));
  83.                 $category $category->getParent();
  84.             }
  85.  
  86.             $path array_reverse($path);
  87.  
  88.             foreach ($path as $item)
  89.             {
  90.                 $this->pathway->addItem($item['title']$item['link']);
  91.             }
  92.         }
  93.  
  94.         parent::addFeed();
  95.     }
  96. }

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