Base
Class Base
Table of Contents
Methods
- addFormElement() : void
- Add form element to end of elements list.
- addFormElementAfter() : void
- Add form element after target element.
- addFormElementBefore() : void
- Add form element before target element.
- addFormElementToEnd() : void
- Analog of add form element.
- addFormElementToStart() : void
- Insert element to start of form elements list.
- getClassName() : string
- getCollectedFormElements() : array<string|int, Base>
- getConfiguration() : Configuration|null
- TODO@ optimise this
- getConfigurations() : array<string|int, Configuration>
- getConfigurationsGidKeyed() : array<string|int, Configuration>
- getFormElement() : Base|BaseValuable|null
- In form elements list find form element with key $fieldKey.
- getFormElementByDataAttribute() : Base|null
- Find form element by attribute key value pair.
- getFormElementFromCollected() : Base|BaseValuable|null
- getFormElements() : array<string|int, Base>
- getFormElementValue() : mixed|null
- Returns value of the form element with given key.
- getView() : View|null
- removeFormElement() : bool
- Remove from form elements list form element.
- setConfigurations() : void
- setFormElements() : void
- Setter to set form elements multiply.
- setView() : void
- updateFormElementValue() : bool
Methods
addFormElement()
Add form element to end of elements list.
public
addFormElement(Base $element) : void
Parameters
- $element : Base
-
Element to add to form.
addFormElementAfter()
Add form element after target element.
public
addFormElementAfter(Base $newElement, Base $targetElement) : void
Parameters
addFormElementBefore()
Add form element before target element.
public
addFormElementBefore(Base $newElement, Base $targetElement) : void
Parameters
addFormElementToEnd()
Analog of add form element.
public
addFormElementToEnd(Base $newElement) : void
Parameters
- $newElement : Base
-
Element which need to insert to end of form.
addFormElementToStart()
Insert element to start of form elements list.
public
addFormElementToStart(Base $newElement) : void
Parameters
- $newElement : Base
-
Element which need to insert to start of form.
getClassName()
public
static getClassName() : string
Return values
stringgetCollectedFormElements()
public
getCollectedFormElements() : array<string|int, Base>
Return values
array<string|int, Base>getConfiguration()
TODO@ optimise this
public
getConfiguration(string $key) : Configuration|null
Parameters
- $key : string
-
Unique key to find configuration.
Return values
Configuration|nullgetConfigurations()
public
getConfigurations() : array<string|int, Configuration>
Return values
array<string|int, Configuration>getConfigurationsGidKeyed()
public
getConfigurationsGidKeyed() : array<string|int, Configuration>
Return values
array<string|int, Configuration>getFormElement()
In form elements list find form element with key $fieldKey.
public
getFormElement(string $fieldKey) : Base|BaseValuable|null
Parameters
- $fieldKey : string
-
Unique key to find form element.
Return values
Base|BaseValuable|nullgetFormElementByDataAttribute()
Find form element by attribute key value pair.
public
getFormElementByDataAttribute(string $attributeKey, string $value) : Base|null
Parameters
- $attributeKey : string
-
Attribute key to find in form elements list.
- $value : string
-
Value of attribute name for needle form element.
Return values
Base|nullgetFormElementFromCollected()
public
getFormElementFromCollected(string $key) : Base|BaseValuable|null
Parameters
- $key : string
-
Unique key to fine element in form elements list.
Return values
Base|BaseValuable|nullgetFormElements()
public
getFormElements() : array<string|int, Base>
Return values
array<string|int, Base>getFormElementValue()
Returns value of the form element with given key.
public
getFormElementValue(string $fieldKey) : mixed|null
Parameters
- $fieldKey : string
-
The key of the field.
Return values
mixed|nullgetView()
public
getView() : View|null
Return values
View|nullremoveFormElement()
Remove from form elements list form element.
public
removeFormElement(Base $element) : bool
Parameters
- $element : Base
-
Element to remove.
Return values
boolsetConfigurations()
public
setConfigurations(array<string|int, Configuration> $configurations) : void
Parameters
- $configurations : array<string|int, Configuration>
-
Configuration list to set.
setFormElements()
Setter to set form elements multiply.
public
setFormElements(array<string|int, Base> $formElementList) : void
Parameters
- $formElementList : array<string|int, Base>
-
Form elements to set in form.
setView()
public
setView(View $view) : void
Parameters
- $view : View
-
View entity to set of handler.
updateFormElementValue()
public
updateFormElementValue(BaseValuable|string $formElement, mixed $value) : bool
Parameters
- $formElement : BaseValuable|string
-
Form element which need to update.
- $value : mixed
-
New value for form element.