PluginsField
class PluginsField extends ListField
Form Field class for the Joomla Framework.
Traits
Trait for classes which require a user to work with.
Properties
protected string
Since: 1.7.0
|
$description | The description text for the form field. Usually used in tooltips. |
from FormField |
protected string
Since: 3.2
|
$hint | The hint text for the form field used to display hint inside the field. |
from FormField |
protected mixed
Since: 3.2
|
$autocomplete | The autocomplete state for the form field. If 'off' element will not be automatically completed by browser. |
from FormField |
protected bool
Since: 3.2
|
$spellcheck | The spellcheck state for the form field. |
from FormField |
protected bool
Since: 3.2
|
$autofocus | The autofocus request for the form field. If true element will be automatically focused on document load. |
from FormField |
protected SimpleXMLElement
Since: 1.7.0
|
$element | The SimpleXMLElement object of the |
from FormField |
protected Form
Since: 1.7.0
|
$form | The Form object of the form attached to the form field. |
from FormField |
protected string
Since: 1.7.0
|
$formControl | The form control prefix for field names from the Form object attached to the form field. |
from FormField |
The hidden state for the form field. |
from FormField | ||
Should the label be hidden when rendering the form field? This may be useful if you have the label rendering in a legend in your form field itself for radio buttons in a fieldset etc. |
from FormField | ||
Should the description be hidden when rendering the form field? This may be useful if you have the description rendering in your form field itself for e.g. note fields. |
from FormField | ||
protected bool
Since: 1.7.0
|
$translateLabel | True to translate the field label string. |
from FormField |
protected bool
Since: 1.7.0
|
$translateDescription | True to translate the field description string. |
from FormField |
protected bool
Since: 3.2
|
$translateHint | True to translate the field hint string. |
from FormField |
protected string
Since: 1.7.0
|
$id | The document id for the form field. |
from FormField |
protected string
Since: 1.7.0
|
$input | The input for the form field. |
from FormField |
protected string
Since: 1.7.0
|
$label | The label for the form field. |
from FormField |
protected bool
Since: 1.7.0
|
$multiple | The multiple state for the form field. If true then multiple values are allowed for the field. Most often used for list field types. |
from FormField |
mixed
Since: 3.2
|
$repeat | Allows extensions to create repeat elements |
from FormField |
protected string
Since: 1.7.0
|
$pattern | The pattern (Reg Ex) of value of the form field. |
from FormField |
protected string
Since: 4.0.0
|
$validationtext | The validation text of invalid value of the form field. |
from FormField |
protected string
Since: 1.7.0
|
$name | The name of the form field. |
from FormField |
protected string
Since: 1.7.0
|
$fieldname | The name of the field. |
from FormField |
protected string
Since: 1.7.0
|
$group | The group of the field. |
from FormField |
protected bool
Since: 1.7.0
|
$required | The required state for the form field. If true then there must be a value for the field to be considered valid. |
from FormField |
protected bool
Since: 3.2
|
$disabled | The disabled state for the form field. If true then the field will be disabled and user can't interact with the field. |
from FormField |
protected bool
Since: 3.2
|
$readonly | The readonly state for the form field. If true then the field will be readonly. |
from FormField |
protected string
Since: 2.5.0
|
$type | The field type. |
|
protected string
Since: 1.7.0
|
$validate | The validation method for the form field. This value will determine which method is used to validate the value for a field. |
from FormField |
protected mixed
Since: 1.7.0
|
$value | The value of the form field. |
from FormField |
protected mixed
Since: 1.7.0
|
$default | The default value of the form field. |
from FormField |
protected int
Since: 3.2
|
$size | The size of the form field. |
from FormField |
protected mixed
Since: 3.2
|
$class | The class of the form field |
from FormField |
protected mixed
Since: 1.7.0
|
$labelclass | The label's CSS class of the form field |
from FormField |
protected string
Since: 3.2
|
$onchange | The javascript onchange of the form field. |
from FormField |
protected string
Since: 3.2
|
$onclick | The javascript onclick of the form field. |
from FormField |
protected string
Since: 3.7.0
|
$showon | The conditions to show/hide the field. |
from FormField |
protected string
Since: 4.0.0
|
$parentclass | The parent class of the field |
from FormField |
static protected int
Since: 1.7.0
|
$count | The count value for generated name field |
from FormField |
static protected string
Since: 1.7.0
|
$generated_fieldname | The string used for generated fields names |
from FormField |
protected string
Since: 4.0.0
|
$layout | Name of the layout being used to render the field |
from ListField |
protected array
Since: 5.1.0
|
$layoutData | Cached data for layout rendering |
from FormField |
protected string | $renderLayout | Layout to render the form field |
from FormField |
protected string | $renderLabelLayout | Layout to render the label |
from FormField |
protected array
Since: 4.0.0
|
$dataAttributes | The data-attribute name and values of the form field. |
from FormField |
protected mixed
Since: 5.1.0
|
$header | The header. |
from ListField |
protected string
Since: 3.2
|
$folder | The path to folder for plugins. |
Methods
Returns the current user, if none is set the identity of the global app is returned. This will change in 6.0 and an empty user will be returned.
Method to get certain otherwise inaccessible properties from the form field object.
Method to set certain otherwise inaccessible properties of the form field object.
Method to attach a Form object to the field.
Method to get the id used for the field input tag.
Method to get the name used for the field input tag.
Method to get an attribute of the field
Method to get a control group with label and input.
Method to filter a field value.
Method to validate a FormField object based on field data.
Method to post-process a field value.
Method to get the data to be passed to the layout for rendering.
Method to get the data to be passed to the layout for rendering.
Method to get a list of options for a list input.
Details
protected User
getCurrentUser()
Returns the current user, if none is set the identity of the global app is returned. This will change in 6.0 and an empty user will be returned.
mixed
__get(string $name)
Method to get certain otherwise inaccessible properties from the form field object.
void
__set(string $name, mixed $value)
Method to set certain otherwise inaccessible properties of the form field object.
bool
setup(SimpleXMLElement $element, mixed $value, string $group = null)
Method to attach a Form object to the field.
protected string
getId(string $fieldId, string $fieldName)
Method to get the id used for the field input tag.
protected string
getInput()
Method to get the field input markup for a generic list.
Use the multiple attribute to enable multiselect.
protected string
getName(string $fieldName)
Method to get the name used for the field input tag.
mixed
getAttribute(string $name, mixed $default = null)
Method to get an attribute of the field
string
renderField(array $options = [])
Method to get a control group with label and input.
mixed
filter(mixed $value, string $group = null, Registry|null $input = null)
Method to filter a field value.
bool|Exception
validate(mixed $value, string $group = null, Registry|null $input = null)
Method to validate a FormField object based on field data.
mixed
postProcess(mixed $value, string $group = null, Registry|null $input = null)
Method to post-process a field value.
protected array
getLayoutData()
Method to get the data to be passed to the layout for rendering.
protected array
collectLayoutData()
Method to get the data to be passed to the layout for rendering.
The data is cached in memory.
protected array
getLayoutPaths()
Allow to override renderer include paths in child fields
ListField
addOption(string $text, string[] $attributes = [])
Method to add an option to the list field.