SubmitButton
extends Button
in package
implements
ClickableInterface
A button that submits the form.
Tags
Table of Contents
Interfaces
- ClickableInterface
- A clickable form element.
Properties
- $clicked : bool
- $config : mixed
- $parent : mixed
- $submitted : bool
Methods
- __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() : FormInterface
- 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() : FormInterface|null
- Returns the parent form.
- getPropertyPath() : PropertyPathInterface|null
- Unsupported method.
- getRoot() : FormInterface
- 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.
- isClicked() : bool
- Returns whether this element was clicked.
- 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() : FormInterface
- 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
$clicked
private
bool
$clicked
= false
$config
private
mixed
$config
$parent
private
mixed
$parent
= null
$submitted
private
bool
$submitted
= false
Methods
__construct()
Creates a new button from a form configuration.
public
__construct(FormConfigInterface $config) : mixed
Parameters
- $config : FormConfigInterface
add()
Unsupported method.
public
add(string|FormInterface $child[, string $type = null ][, array<string|int, mixed> $options = [] ]) : $this
This method should not be invoked.
Parameters
- $child : string|FormInterface
-
The FormInterface instance or the name of the child
- $type : string = 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
$thisaddError()
Unsupported method.
public
addError(FormError $error) : $this
Parameters
- $error : FormError
Tags
Return values
$thisall()
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
intcreateView()
public
createView([FormView $parent = null ]) : FormView
Parameters
- $parent : FormView = null
Return values
FormViewget()
Unsupported method.
public
get(string $name) : FormInterface
This method should not be invoked.
Parameters
- $name : string
Tags
Return values
FormInterfacegetConfig()
Returns the button's configuration.
public
getConfig() : FormConfigInterface
Return values
FormConfigInterfacegetData()
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([bool $deep = false ][, bool $flatten = true ]) : FormErrorIterator
Parameters
- $deep : bool = false
-
Whether to include errors of child forms as well
- $flatten : bool = true
-
Whether to flatten the list of errors in case $deep is set to true
Return values
FormErrorIteratorgetExtraData()
Unsupported method.
public
getExtraData() : array<string|int, mixed>
Return values
array<string|int, mixed> —The submitted data which do not belong to a child
getIterator()
Unsupported method.
public
getIterator() : EmptyIterator
Return values
EmptyIteratorgetName()
Returns the name by which the button is identified in forms.
public
getName() : string
Return values
stringgetNormData()
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() : FormInterface|null
Return values
FormInterface|nullgetPropertyPath()
Unsupported method.
public
getPropertyPath() : PropertyPathInterface|null
Return values
PropertyPathInterface|nullgetRoot()
Returns the root of the form tree.
public
getRoot() : FormInterface
Return values
FormInterfacegetTransformationFailure()
Unsupported method.
public
getTransformationFailure() : TransformationFailedException|null
Return values
TransformationFailedException|nullgetViewData()
Unsupported method.
public
getViewData() : mixed
handleRequest()
Unsupported method.
public
handleRequest([mixed $request = null ]) : $this
Parameters
- $request : mixed = null
Tags
Return values
$thishas()
Unsupported method.
public
has(string $name) : bool
Parameters
- $name : string
Return values
boolinitialize()
Unsupported method.
public
initialize() : $this
Tags
Return values
$thisisClicked()
Returns whether this element was clicked.
public
isClicked() : bool
Return values
boolisDisabled()
Returns whether this form is disabled.
public
isDisabled() : bool
Return values
boolisEmpty()
Unsupported method.
public
isEmpty() : bool
Return values
boolisRequired()
Unsupported method.
public
isRequired() : bool
Return values
boolisRoot()
Returns whether the field is the root of the form tree.
public
isRoot() : bool
Return values
boolisSubmitted()
Returns whether the button is submitted.
public
isSubmitted() : bool
Return values
boolisSynchronized()
Unsupported method.
public
isSynchronized() : bool
Return values
boolisValid()
Unsupported method.
public
isValid() : bool
Return values
booloffsetExists()
Unsupported method.
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
Unsupported method.
public
offsetGet(mixed $offset) : FormInterface
This method should not be invoked.
Parameters
- $offset : mixed
Tags
Return values
FormInterfaceoffsetSet()
Unsupported method.
public
offsetSet(mixed $offset, mixed $value) : void
This method should not be invoked.
Parameters
- $offset : mixed
- $value : mixed
Tags
offsetUnset()
Unsupported method.
public
offsetUnset(mixed $offset) : void
This method should not be invoked.
Parameters
- $offset : mixed
Tags
remove()
Unsupported method.
public
remove(string $name) : $this
This method should not be invoked.
Parameters
- $name : string
Tags
Return values
$thissetData()
Unsupported method.
public
setData(mixed $modelData) : $this
This method should not be invoked.
Parameters
- $modelData : mixed
-
The data formatted as expected for the underlying object
Return values
$thissetParent()
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
$thissubmit()
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
-
The submitted data
- $clearMissing : bool = true
-
Whether to set fields to NULL when they are missing in the submitted data. This argument is only used in compound form