10 defined(
'JPATH_PLATFORM') or die;
29 protected $type =
'Usergroup';
38 protected function getInput()
44 $attr .= !empty($this->
class) ?
' class="' . $this->
class . '"' : '';
45 $attr .= $this->disabled ? ' disabled' : '';
46 $attr .= $this->size ? ' size="' . $this->size . '"' : '';
47 $attr .= $this->multiple ? ' multiple' : '';
48 $attr .= $this->required ? ' required aria-required="true"' : '';
49 $attr .= $this->autofocus ? ' autofocus' : '';
52 $attr .= !empty($this->onchange) ? ' onchange="' . $this->onchange . '"' : '';
53 $attr .= !empty($this->onclick) ? ' onclick="' . $this->onclick . '"' : '';
56 foreach ($this->element->children() as $option)
59 if ($option->getName() !=
'option')
64 $disabled = (string) $option[
'disabled'];
65 $disabled = ($disabled ==
'true' || $disabled ==
'disabled' || $disabled ==
'1');
69 'select.option', (
string) $option[
'value'], trim((
string) $option),
'value',
'text',
74 $tmp->class = (string) $option[
'class'];
77 $tmp->onclick = (string) $option[
'onclick'];
83 return JHtml::_(
'access.usergroup', $this->name, $this->value, $attr, $options, $this->
id);