Source for file limitbox.php
Documentation is available at limitbox.php
* @package Joomla.Libraries
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Field to load a list of posible item count limits
* @package Joomla.Libraries
public $type =
'Limitbox';
* Cached array of the category items.
protected static $options =
array();
* Method to get the options to populate to populate list
* @return array The field option objects.
if (!isset
(static::$options[$hash]))
static::$options[$hash] =
parent::getOptions();
$limits =
$this->defaultLimits;
// Limits manually specified
if (isset
($this->element['limits']))
$limits =
explode(',', $this->element['limits']);
// User wants to add custom limits
if (isset
($this->element['append']))
$limits =
array_unique(array_merge($limits, explode(',', $this->element['append'])));
// User wants to remove some default limits
if (isset
($this->element['remove']))
// Add an option to show all?
$showAll = isset
($this->element['showall']) ?
($this->element['showall'] ==
"true") :
true;
foreach ($limits as $value)
$options[] = (object)
array(
'text' =>
($value !=
0) ?
JText::_('J' .
$value) :
JText::_('JALL')
static::$options[$hash] =
array_merge(static::$options[$hash], $options);
return static::$options[$hash];
Documentation generated on Tue, 19 Nov 2013 15:07:05 +0100 by phpDocumentor 1.4.3