Source for file published.php
Documentation is available at published.php
* @package FrameworkOnFramework
* @copyright Copyright (C) 2010 - 2012 Akeeba Ltd. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
// Protect from unauthorized access
require_once JPATH_LIBRARIES .
'/joomla/form/fields/list.php';
* Form Field class for FOF
* Supports a generic list of options.
* @package FrameworkOnFramework
/** @var FOFTable The item being rendered in a repeatable form field */
/** @var int A monotonically increasing number, denoting the row number in a repeatable view */
* Method to get certain otherwise inaccessible properties from the form field object.
* @param string $name The property name for which to the the value.
* @return mixed The property value or null.
public function __get($name)
return parent::__get($name);
* Method to get the field options.
* @return array The field option objects.
// If no custom options were defined let's figure out which ones of the
// defaults we shall use...
// We are no longer using jgrid.publishedOptions as it's returning
// untranslated strings, unsuitable for our purposes.
if ($this->element['show_published'] ==
'false')
$stack[] =
JHtml::_('select.option', '1', JText::_('JPUBLISHED'));
if ($this->element['show_unpublished'] ==
'false')
$stack[] =
JHtml::_('select.option', '0', JText::_('JUNPUBLISHED'));
if ($this->element['show_archived'] ==
'true')
$stack[] =
JHtml::_('select.option', '2', JText::_('JARCHIVED'));
if ($this->element['show_trash'] ==
'true')
$stack[] =
JHtml::_('select.option', '-2', JText::_('JTRASHED'));
if ($this->element['show_all'] ==
'true')
$stack[] =
JHtml::_('select.option', '*', JText::_('JALL'));
* Get the rendering of this field type for static display, e.g. in a single
* item view (typically a "read" task).
* @return string The field HTML
$class =
$this->element['class'] ?
' class="' . (string)
$this->element['class'] .
'"' :
'';
return '<span id="' .
$this->id .
'" ' .
$class .
'>' .
* Get the rendering of this field type for a repeatable (grid) display,
* e.g. in a view listing many item (typically a "browse" task)
* @return string The field HTML
throw
new Exception(__CLASS__ .
' needs a FOFTable to act upon');
$prefix = (string)
$this->element['prefix'];
$checkbox = (string)
$this->element['checkbox'];
$publish_up = (string)
$this->element['publish_up'];
if ($this->element['publish_down'])
$publish_down = (string)
$this->element['publish_down'];
// @todo Enforce ACL checks to determine if the field should be enabled or not
return JHTML::_('jgrid.published', $this->value, $this->rowid, $prefix, $enabled, $checkbox, $publish_up, $publish_down);
Documentation generated on Tue, 19 Nov 2013 15:11:23 +0100 by phpDocumentor 1.4.3