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
loadForm
Method to get a form object.
loadForm( name, source = null, mixed||string|int options = [], clear = false, 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<string|int, mixed>
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
loadFormData
Method to get the data that should be injected in the form.
loadFormData() : mixed||string|int
since |
4.0.0 |
---|
Response
array<string|int, mixed>
The default data is an empty array.
preprocessData
Method to allow derived classes to preprocess the data.
preprocessData( context, &data, group = 'content') :
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").
Response
void
preprocessForm
Method to allow derived classes to preprocess the form.
preprocessForm(\Joomla\CMS\Form\Form form, data, group = 'content') :