|
| __construct ($form=null) |
|
| __get ($name) |
|
| __set ($name, $value) |
|
| setForm (Form $form) |
|
| setup (\SimpleXMLElement $element, $value, $group=null) |
|
| setValue ($value) |
|
| getAttribute ($name, $default=null) |
|
| getDataAttributes () |
|
| renderDataAttributes () |
|
| render ($layoutId, $data=array()) |
|
| renderField ($options=array()) |
|
| filter ($value, $group=null, Registry $input=null) |
|
| validate ($value, $group=null, Registry $input=null) |
|
| postProcess ($value, $group=null, Registry $input=null) |
|
| setDatabase (DatabaseInterface $db) |
|
Abstract Form Field class for the Joomla Platform.
- Depuis
- 1.7.0
◆ __construct()
__construct |
( |
|
$form = null | ) |
|
◆ __get()
Method to get certain otherwise inaccessible properties from the form field object.
- Paramètres
-
string | $name | The property name for which to get the value. |
- Renvoie
- mixed The property value or null.
- Depuis
- 1.7.0
Références $input, $label, $name, et Joomla\Application\getInput().
◆ __set()
Method to set certain otherwise inaccessible properties of the form field object.
- Paramètres
-
string | $name | The property name for which to set the value. |
mixed | $value | The value of the property. |
- Renvoie
- void
- Depuis
- 3.2
Références $name, $value, Log\add(), et name.
◆ filter()
◆ getAttribute()
getAttribute |
( |
|
$name, |
|
|
|
$default = null |
|
) |
| |
Method to get an attribute of the field
- Paramètres
-
string | $name | Name of the attribute to get |
mixed | $default | Optional value to return if attribute not found |
- Renvoie
- mixed Value of the attribute / default
- Depuis
- 3.2
Références $attributes, $default, et null.
◆ getDataAttributes()
Method to get data attributes. For example, data-user-type
- Renvoie
- array list of data attribute(s)
- Depuis
- 4.0.0
◆ getFieldName()
getFieldName |
( |
|
$fieldName | ) |
|
|
protected |
Method to get the field name used.
- Paramètres
-
string | $fieldName | The field element name. |
- Renvoie
- string The field name
- Depuis
- 1.7.0
Références $count.
◆ getId()
getId |
( |
|
$fieldId, |
|
|
|
$fieldName |
|
) |
| |
|
protected |
Method to get the id used for the field input tag.
- Paramètres
-
string | $fieldId | The field element id. |
string | $fieldName | The field element name. |
- Renvoie
- string The id to be used for the field input tag.
- Depuis
- 1.7.0
Références $id.
◆ getInput()
Method to get the field input markup.
- Renvoie
- string The field input markup.
- Depuis
- 1.7.0
Références name.
◆ getLabel()
Method to get the field label markup.
- Renvoie
- string The field label markup.
- Depuis
- 1.7.0
Références $data, et $position.
◆ getLayoutData()
Method to get the data to be passed to the layout for rendering.
- Renvoie
- array
- Depuis
- 3.5
Références $alt, $autocomplete, $autofocus, $class, $description, $disabled, $hint, $id, $label, $name, $onchange, $onclick, $readonly, $this, Text\_(), Text\alt(), description, null, et value.
◆ getLayoutPaths()
Allow to override renderer include paths in child fields
- Renvoie
- array
- Depuis
- 3.5
Références $renderer.
◆ getName()
Method to get the name used for the field input tag.
- Paramètres
-
string | $fieldName | The field element name. |
- Renvoie
- string The name to be used for the field input tag.
- Depuis
- 1.7.0
Références $groups, et $name.
◆ getRenderer()
getRenderer |
( |
|
$layoutId = 'default' | ) |
|
|
protected |
Get the renderer
- Paramètres
-
string | $layoutId | Id to load |
- Renvoie
- FileLayout
- Depuis
- 3.5
Références $renderer.
◆ getTitle()
Method to get the field title.
- Renvoie
- string The field title.
- Depuis
- 1.7.0
Références $title, et Text\_().
◆ isDebugEnabled()
Is debug enabled for this field
- Renvoie
- boolean
- Depuis
- 3.5
◆ postProcess()
Method to post-process a field value.
- Paramètres
-
mixed | $value | The optional value to use as the default for the field. |
string | $group | The optional dot-separated form group path on which to find the field. |
Registry | $input | An optional Registry object with the entire data set to filter against the entire form. |
- Renvoie
- mixed The processed value.
- Depuis
- 4.0.0
Références $value.
◆ render()
render |
( |
|
$layoutId, |
|
|
|
$data = array() |
|
) |
| |
Render a layout of this field
- Paramètres
-
string | $layoutId | Layout identifier |
array | $data | Optional data for the layout |
- Renvoie
- string
- Depuis
- 3.5
Références $data.
◆ renderDataAttributes()
◆ renderField()
renderField |
( |
|
$options = array() | ) |
|
◆ setForm()
Method to attach a Form object to the field.
- Paramètres
-
Form | $form | The Form object to attach to the form field. |
- Renvoie
- FormField The form field object so that the method can be used in a chain.
- Depuis
- 1.7.0
Références $form, et $this.
◆ setup()
setup |
( |
\SimpleXMLElement |
$element, |
|
|
|
$value, |
|
|
|
$group = null |
|
) |
| |
Method to attach a Form object to the field.
- Paramètres
-
\SimpleXMLElement | $element | The SimpleXMLElement object representing the <field> tag for the form field object. |
mixed | $value | The form field value to validate. |
string | $group | The field name group control value. This acts as 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]". |
- Renvoie
- boolean True on success.
- Depuis
- 1.7.0
Références $attributes, $key, $value, class, null, et value.
Référencé par IntervalField\setup().
◆ setValue()
Simple method to set the value
- Paramètres
-
- Renvoie
- void
- Depuis
- 3.2
Références $value, et value.
◆ validate()
Method to validate a FormField object based on field data.
- Paramètres
-
mixed | $value | The optional value to use as the default for the field. |
string | $group | The optional dot-separated form group path on which to find the field. |
Registry | $input | An optional Registry object with the entire data set to validate against the entire form. |
- Renvoie
- boolean| Boolean true if field value is valid, Exception on failure.
- Depuis
- 4.0.0
- Exceptions
-
Références $input, $message, $required, $this, $type, $value, Text\_(), class, Factory\getContainer(), Joomla\Database\getDatabase(), FormHelper\loadRuleType(), null, et Text\sprintf().
◆ $autocomplete
◆ $autofocus
◆ $class
◆ $count
◆ $dataAttributes
$dataAttributes = array() |
|
protected |
◆ $default
◆ $description
◆ $disabled
◆ $element
◆ $fieldname
◆ $form
◆ $formControl
◆ $generated_fieldname
$generated_fieldname = '__field' |
|
staticprotected |
◆ $group
◆ $hidden
◆ $hiddenDescription
$hiddenDescription = false |
|
protected |
◆ $hiddenLabel
◆ $hint
◆ $id
◆ $input
◆ $label
◆ $labelclass
◆ $layout
◆ $multiple
◆ $name
◆ $onchange
◆ $onclick
◆ $parentclass
◆ $pattern
◆ $readonly
◆ $renderLabelLayout
$renderLabelLayout = 'joomla.form.renderlabel' |
|
protected |
◆ $renderLayout
$renderLayout = 'joomla.form.renderfield' |
|
protected |
◆ $repeat
◆ $required
◆ $showon
◆ $size
◆ $spellcheck
◆ $translateDescription
$translateDescription = true |
|
protected |
◆ $translateHint
◆ $translateLabel
◆ $type
◆ $validate
◆ $validationtext
◆ $value
La documentation de cette classe a été générée à partir du fichier suivant :