UsergrouplistField

Extends \JFormFieldList

Field to load a dropdown list of available user groups

Supports a generic list of options.

since

3.2

Methods

__get

Method to get certain otherwise inaccessible properties from the form field object.

__get(string $name) : mixed
inherited
since

3.7.0

Arguments

$name

stringThe property name for which to get the value.

Response

mixedThe property value or null.

addOption

Method to add an option to the list field.

addOption(string $text, array $attributes = array()) : \JFormFieldList
inherited
since

3.7.0

Arguments

$text

stringText/Language variable of the option.

$attributes

arrayArray of attributes ('name' => 'value' format)

Response

\JFormFieldListFor chaining.

getInput

Method to get the field input markup for a generic list.

getInput() : string
inherited

Use the multiple attribute to enable multiselect.

since

3.7.0

Response

stringThe field input markup.

getOptions

Method to get the field options.

getOptions() : array
inherited
since

3.7.0

Response

arrayThe field option objects.

setup

Method to attach a JForm object to the field.

setup(\SimpleXMLElement $element, mixed $value, string $group = null) : boolean
since

1.7.0

Arguments

$element

\SimpleXMLElementThe SimpleXMLElement object representing the <field> tag for the form field object.

$value

mixedThe form field value to validate.

$group

stringThe field name group control value. This acts as an array container for the field. For example if the field has name="foo" and the group value is set to "bar" then the full field name would end up being "bar[foo]".

Response

booleanTrue on success.

Properties

type

The form field type.

inherited
since

1.7.0

Type(s)

string

options

Cached array of the category items.

static
since

3.2

Type(s)

array