Button
in package
implements
IteratorAggregate, FormInterface
A form button.
Tags
Interfaces, Classes, Traits and Enums
- IteratorAggregate
- FormInterface
- A form group bundling multiple forms in a hierarchical structure.
Table of Contents
- $config : FormConfigInterface
- $parent : FormInterface|null
- $submitted : bool
- __construct() : mixed
- Creates a new button from a form configuration.
- add() : $this
- Unsupported method.
- addError() : $this
- Unsupported method.
- all() : array<string|int, self>
- Returns all children in this group.
- count() : int
- Unsupported method.
- createView() : FormView
- get() : self
- Unsupported method.
- getConfig() : FormConfigInterface
- Returns the button's configuration.
- getData() : mixed
- Unsupported method.
- getErrors() : FormErrorIterator
- Returns the errors of this form.
- getExtraData() : array<string|int, mixed>
- Unsupported method.
- getIterator() : EmptyIterator
- Unsupported method.
- getName() : string
- Returns the name by which the button is identified in forms.
- getNormData() : mixed
- Unsupported method.
- getParent() : self|null
- Returns the parent form.
- getPropertyPath() : PropertyPathInterface|null
- Unsupported method.
- getRoot() : self
- Returns the root of the form tree.
- getTransformationFailure() : TransformationFailedException|null
- Unsupported method.
- getViewData() : mixed
- Unsupported method.
- handleRequest() : $this
- Unsupported method.
- has() : bool
- Unsupported method.
- initialize() : $this
- Unsupported method.
- isDisabled() : bool
- Returns whether this form is disabled.
- isEmpty() : bool
- Unsupported method.
- isRequired() : bool
- Unsupported method.
- isRoot() : bool
- Returns whether the field is the root of the form tree.
- isSubmitted() : bool
- Returns whether the button is submitted.
- isSynchronized() : bool
- Unsupported method.
- isValid() : bool
- Unsupported method.
- offsetExists() : bool
- Unsupported method.
- offsetGet() : mixed
- Unsupported method.
- offsetSet() : void
- Unsupported method.
- offsetUnset() : void
- Unsupported method.
- remove() : $this
- Unsupported method.
- setData() : $this
- Unsupported method.
- setParent() : $this
- Sets the parent form.
- submit() : $this
- Submits data to the button.
Properties
$config
private
FormConfigInterface
$config
$parent
private
FormInterface|null
$parent
$submitted
private
bool
$submitted
= false
Methods
__construct()
Creates a new button from a form configuration.
public
__construct(FormConfigInterface $config) : mixed
Parameters
- $config : FormConfigInterface
Return values
mixed —add()
Unsupported method.
public
add(mixed $child[, mixed $type = null ][, array<string|int, mixed> $options = [] ]) : $this
This method should not be invoked.
Parameters
- $child : mixed
-
The FormInterface instance or the name of the child
- $type : mixed = null
-
The child's type, if a name was passed
- $options : array<string|int, mixed> = []
-
The child's options, if a name was passed
Tags
Return values
$this —addError()
Unsupported method.
public
addError(FormError $error) : $this
Parameters
- $error : FormError
Tags
Return values
$this —all()
Returns all children in this group.
public
all() : array<string|int, self>
Return values
array<string|int, self> —count()
Unsupported method.
public
count() : int
Return values
int —Always returns 0
createView()
public
createView([FormView $parent = null ]) : FormView
Parameters
- $parent : FormView = null
Return values
FormView —The view
get()
Unsupported method.
public
get(string $name) : self
This method should not be invoked.
Parameters
- $name : string
Tags
Return values
self —getConfig()
Returns the button's configuration.
public
getConfig() : FormConfigInterface
Return values
FormConfigInterface —The configuration instance
getData()
Unsupported method.
public
getData() : mixed
Return values
mixed —When the field is not submitted, the default data is returned. When the field is submitted, the default data has been bound to the submitted view data.
getErrors()
Returns the errors of this form.
public
getErrors([mixed $deep = false ][, mixed $flatten = true ]) : FormErrorIterator
Parameters
- $deep : mixed = false
-
Whether to include errors of child forms as well
- $flatten : mixed = true
-
Whether to flatten the list of errors in case $deep is set to true
Return values
FormErrorIterator —An iterator over the instances that where added to this form
getExtraData()
Unsupported method.
public
getExtraData() : array<string|int, mixed>
Return values
array<string|int, mixed> —Always returns an empty array
getIterator()
Unsupported method.
public
getIterator() : EmptyIterator
Return values
EmptyIterator —Always returns an empty iterator
getName()
Returns the name by which the button is identified in forms.
public
getName() : string
Return values
string —The name of the button
getNormData()
Unsupported method.
public
getNormData() : mixed
Return values
mixed —When the field is not submitted, the default data is returned. When the field is submitted, the normalized submitted data is returned if the field is synchronized with the view data, null otherwise.
getParent()
Returns the parent form.
public
getParent() : self|null
Return values
self|null —The parent form or null if there is none
getPropertyPath()
Unsupported method.
public
getPropertyPath() : PropertyPathInterface|null
Return values
PropertyPathInterface|null —The property path instance
getRoot()
Returns the root of the form tree.
public
getRoot() : self
Return values
self —The root of the tree, may be the instance itself
getTransformationFailure()
Unsupported method.
public
getTransformationFailure() : TransformationFailedException|null
Return values
TransformationFailedException|null —The transformation failure or null
getViewData()
Unsupported method.
public
getViewData() : mixed
Return values
mixed —handleRequest()
Unsupported method.
public
handleRequest([mixed $request = null ]) : $this
Parameters
- $request : mixed = null
Tags
Return values
$this —has()
Unsupported method.
public
has(string $name) : bool
Parameters
- $name : string
Return values
bool —Always returns false
initialize()
Unsupported method.
public
initialize() : $this
Tags
Return values
$this —isDisabled()
Returns whether this form is disabled.
public
isDisabled() : bool
Return values
bool —isEmpty()
Unsupported method.
public
isEmpty() : bool
Return values
bool —Always returns true
isRequired()
Unsupported method.
public
isRequired() : bool
Return values
bool —Always returns false
isRoot()
Returns whether the field is the root of the form tree.
public
isRoot() : bool
Return values
bool —isSubmitted()
Returns whether the button is submitted.
public
isSubmitted() : bool
Return values
bool —true if the button was submitted
isSynchronized()
Unsupported method.
public
isSynchronized() : bool
Return values
bool —Always returns true
isValid()
Unsupported method.
public
isValid() : bool
Return values
bool —Always returns true
offsetExists()
Unsupported method.
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
bool —Always returns false
offsetGet()
Unsupported method.
public
offsetGet(mixed $offset) : mixed
This method should not be invoked.
Parameters
- $offset : mixed
Tags
Return values
mixed —offsetSet()
Unsupported method.
public
offsetSet(mixed $offset, mixed $value) : void
This method should not be invoked.
Parameters
- $offset : mixed
- $value : mixed
Tags
Return values
void —offsetUnset()
Unsupported method.
public
offsetUnset(mixed $offset) : void
This method should not be invoked.
Parameters
- $offset : mixed
Tags
Return values
void —remove()
Unsupported method.
public
remove(string $name) : $this
This method should not be invoked.
Parameters
- $name : string
Tags
Return values
$this —setData()
Unsupported method.
public
setData(mixed $modelData) : $this
This method should not be invoked.
Parameters
- $modelData : mixed
Return values
$this —setParent()
Sets the parent form.
public
setParent([FormInterface $parent = null ]) : $this
Parameters
- $parent : FormInterface = null
-
The parent form or null if it's the root
Return values
$this —submit()
Submits data to the button.
public
submit(array<string|int, mixed>|string|null $submittedData[, bool $clearMissing = true ]) : $this
Parameters
- $submittedData : array<string|int, mixed>|string|null
-
Not used
- $clearMissing : bool = true
-
Not used