[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/libraries/joomla/html/parameter/element/ -> category.php (source)

   1  <?php
   2  /**
   3   * @package     Joomla.Platform
   4   * @subpackage  HTML
   5   *
   6   * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
   7   * @license     GNU General Public License version 2 or later; see LICENSE
   8   */
   9  
  10  defined('JPATH_PLATFORM') or die;
  11  
  12  /**
  13   * Renders a category element
  14   *
  15   * @package     Joomla.Platform
  16   * @subpackage  Parameter
  17   * @since       11.1
  18   * @deprecated  Use JFormFieldCategory instead.
  19   */
  20  class JElementCategory extends JElement
  21  {
  22      /**
  23       * Element name
  24       *
  25       * @var    string
  26       */
  27      protected $_name = 'Category';
  28  
  29      /**
  30       * Fetch the element
  31       *
  32       * @param   string       $name          Element name
  33       * @param   string       $value         Element value
  34       * @param   JXMLElement  &$node         JXMLElement node object containing the settings for the element
  35       * @param   string       $control_name  Control name
  36       *
  37       * @return  string
  38       *
  39       * @since   11.1
  40       * @deprecated    12.1
  41       */
  42  	public function fetchElement($name, $value, &$node, $control_name)
  43      {
  44          // Deprecation warning.
  45          JLog::add('JElementCategory::fetchElement() is deprecated.', JLog::WARNING, 'deprecated');
  46  
  47          $db = JFactory::getDbo();
  48  
  49          $extension = $node->attributes('extension');
  50          $class = $node->attributes('class');
  51          $filter = explode(',', $node->attributes('filter'));
  52  
  53          if (!isset($extension))
  54          {
  55              // Alias for extension
  56              $extension = $node->attributes('scope');
  57              if (!isset($extension))
  58              {
  59                  $extension = 'com_content';
  60              }
  61          }
  62  
  63          if (!$class)
  64          {
  65              $class = "inputbox";
  66          }
  67  
  68          if (count($filter) < 1)
  69          {
  70              $filter = null;
  71          }
  72  
  73          return JHtml::_(
  74              'list.category',
  75              $control_name . '[' . $name . ']',
  76              $extension,
  77              $extension . '.view',
  78              $filter,
  79              (int) $value,
  80              $class,
  81              null,
  82              1,
  83              $control_name . $name
  84          );
  85      }
  86  }


Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1