Source for file usergroup.php
Documentation is available at usergroup.php
* @package Joomla.Platform
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* Form Field class for the Joomla Platform.
* Supports a nested check box field listing user groups.
* Multiselect is available by default.
* @package Joomla.Platform
protected $type =
'Usergroup';
* Method to get the user group field input markup.
* @return string The field input markup.
// Initialize some field attributes.
$attr .=
!empty($this->class) ?
' class="' .
$this->class .
'"' :
'';
$attr .=
$this->disabled ?
' disabled' :
'';
$attr .=
$this->size ?
' size="' .
$this->size .
'"' :
'';
$attr .=
$this->multiple ?
' multiple' :
'';
$attr .=
$this->required ?
' required aria-required="true"' :
'';
$attr .=
$this->autofocus ?
' autofocus' :
'';
// Initialize JavaScript field attributes.
$attr .=
!empty($this->onclick) ?
' onclick="' .
$this->onclick .
'"' :
'';
// Iterate through the children and build an array of options.
foreach ($this->element->children() as $option)
// Only add <option /> elements.
if ($option->getName() !=
'option')
$disabled = (string)
$option['disabled'];
$disabled =
($disabled ==
'true' ||
$disabled ==
'disabled' ||
$disabled ==
'1');
// Create a new option object based on the <option /> element.
'select.option', (string)
$option['value'], trim((string)
$option), 'value', 'text',
// Set some option attributes.
$tmp->class = (string)
$option['class'];
// Set some JavaScript option attributes.
$tmp->onclick = (string)
$option['onclick'];
// Add the option object to the result set.
return JHtml::_('access.usergroup', $this->name, $this->value, $attr, $options, $this->id);
Documentation generated on Tue, 19 Nov 2013 15:16:35 +0100 by phpDocumentor 1.4.3