FormBehaviorTrait
Trait which supports form behavior.
since |
4.0.0 |
---|---|
package |
Joomla CMS |
Methods
getFormFactory
Get the FormFactoryInterface.
getFormFactory() : \Joomla\CMS\Form\FormFactoryInterface
since |
4.0.0 |
---|---|
throws |
|
Response
\Joomla\CMS\Form\FormFactoryInterface
loadForm
Method to get a form object.
loadForm(string name, string source = null, array options = array(), bool clear = false, string xpath = null) : \Joomla\CMS\Form\Form
see | Form |
---|---|
since |
4.0.0 |
throws |
|
Arguments
- name
string
The name of the form.- source
string
The form source. Can be XML string if file flag is set to false.- options
array
Optional array of options for the form creation.- clear
bool
Optional argument to force load a new form.- xpath
string
An optional xpath to search for the fields.
Response
\Joomla\CMS\Form\Form
loadFormData
Method to get the data that should be injected in the form.
loadFormData() : array
since |
4.0.0 |
---|
Response
array
The default data is an empty array.
preprocessData
Method to allow derived classes to preprocess the data.
preprocessData(string context, mixed &data, string group = 'content') : void
since |
4.0.0 |
---|
Arguments
- context
string
The context identifier.- data
mixed
The data to be processed. It gets altered directly.- group
string
The name of the plugin group to import (defaults to "content").
preprocessForm
Method to allow derived classes to preprocess the form.
preprocessForm(\Joomla\CMS\Form\Form form, mixed data, string group = 'content') : void
see | FormField |
---|---|
since |
4.0.0 |
throws |
|
Arguments
- form
\Joomla\CMS\Form\Form
A Form object.- data
mixed
The data expected for the form.- group
string
The name of the plugin group to import (defaults to "content").