class SubmitButton extends Button implements ClickableInterface

A button that submits the form.

Methods

__construct(FormConfigInterface $config)

Creates a new button from a form configuration.

from Button
bool
offsetExists(mixed $offset)

Unsupported method.

from Button
offsetGet(mixed $offset)

Unsupported method.

from Button
offsetSet(mixed $offset, mixed $value)

Unsupported method.

from Button
offsetUnset(mixed $offset)

Unsupported method.

from Button
setParent(FormInterface $parent = null)

Sets the parent form.

from Button
getParent()

Returns the parent form.

from Button
add(FormInterface|string|int $child, string|null $type = null, array $options = array())

Unsupported method.

from Button
get(string $name)

Unsupported method.

from Button
bool
has(string $name)

Unsupported method.

from Button
$this
remove(string $name)

Unsupported method.

from Button
all()

Returns all children in this group.

from Button
getErrors(bool $deep = false, bool $flatten = true)

Returns the errors of this form.

from Button
$this
setData(mixed $modelData)

Unsupported method.

from Button
mixed
getData()

Unsupported method.

from Button
mixed
getNormData()

Unsupported method.

from Button
mixed
getViewData()

Unsupported method.

from Button
array
getExtraData()

Unsupported method.

from Button
getConfig()

Returns the button's configuration.

from Button
bool
isSubmitted()

Returns whether the button is submitted.

from Button
string
getName()

Returns the name by which the button is identified in forms.

from Button
getPropertyPath()

Unsupported method.

from Button
$this
addError(FormError $error)

Unsupported method.

from Button
bool
isValid()

Unsupported method.

from Button
bool
isRequired()

Unsupported method.

from Button
bool
isDisabled()

Returns whether this form is disabled.

from Button
bool
isEmpty()

Unsupported method.

from Button
bool
isSynchronized()

Unsupported method.

from Button
$this
initialize()

Unsupported method.

from Button
$this
handleRequest(mixed $request = null)

Unsupported method.

from Button
$this
submit(mixed $submittedData, bool $clearMissing = true)

Submits data to the button.

getRoot()

Returns the root of the form tree.

from Button
bool
isRoot()

Returns whether the field is the root of the form tree.

from Button
createView(FormView $parent = null)

Creates a view.

from Button
int
count()

Unsupported method.

from Button
getIterator()

Unsupported method.

from Button
bool
isClicked()

Returns whether this element was clicked.

Details

in Button at line line 44
__construct(FormConfigInterface $config)

Creates a new button from a form configuration.

Parameters

FormConfigInterface $config The button's configuration

in Button at line line 56
bool offsetExists(mixed $offset)

Unsupported method.

Parameters

mixed $offset

Return Value

bool Always returns false

in Button at line line 70
offsetGet(mixed $offset)

Unsupported method.

This method should not be invoked.

Parameters

mixed $offset

Exceptions

BadMethodCallException

in Button at line line 85
offsetSet(mixed $offset, mixed $value)

Unsupported method.

This method should not be invoked.

Parameters

mixed $offset
mixed $value

Exceptions

BadMethodCallException

in Button at line line 99
offsetUnset(mixed $offset)

Unsupported method.

This method should not be invoked.

Parameters

mixed $offset

Exceptions

BadMethodCallException

in Button at line line 107
FormInterface setParent(FormInterface $parent = null)

Sets the parent form.

Parameters

FormInterface $parent

Return Value

FormInterface

Exceptions

AlreadySubmittedException if the form has already been submitted
LogicException when trying to set a parent for a form with an empty name

in Button at line line 119
FormInterface|null getParent()

Returns the parent form.

Return Value

FormInterface|null The parent form or null if there is none

in Button at line line 135
FormInterface add(FormInterface|string|int $child, string|null $type = null, array $options = array())

Unsupported method.

This method should not be invoked.

Parameters

FormInterface|string|int $child The FormInterface instance or the name of the child
string|null $type The child's type, if a name was passed
array $options The child's options, if a name was passed

Return Value

FormInterface

Exceptions

BadMethodCallException

in Button at line line 149
FormInterface get(string $name)

Unsupported method.

This method should not be invoked.

Parameters

string $name The name of the child

Return Value

FormInterface

Exceptions

BadMethodCallException

in Button at line line 161
bool has(string $name)

Unsupported method.

Parameters

string $name The name of the child

Return Value

bool

in Button at line line 175
$this remove(string $name)

Unsupported method.

This method should not be invoked.

Parameters

string $name The name of the child to remove

Return Value

$this

Exceptions

BadMethodCallException

in Button at line line 183
FormInterface[] all()

Returns all children in this group.

Return Value

FormInterface[]

in Button at line line 191
FormErrorIterator getErrors(bool $deep = false, bool $flatten = true)

Returns the errors of this form.

Parameters

bool $deep Whether to include errors of child forms as well
bool $flatten Whether to flatten the list of errors in case $deep is set to true

Return Value

FormErrorIterator An iterator over the {@link FormError} instances that where added to this form

in Button at line line 203
$this setData(mixed $modelData)

Unsupported method.

This method should not be invoked.

Parameters

mixed $modelData The data formatted as expected for the underlying object

Return Value

$this

in Button at line line 212
mixed getData()

Unsupported method.

Return Value

mixed

in Button at line line 219
mixed getNormData()

Unsupported method.

Return Value

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 valid, null otherwise.

in Button at line line 226
mixed getViewData()

Unsupported method.

Return Value

mixed

in Button at line line 235
array getExtraData()

Unsupported method.

Return Value

array The submitted data which do not belong to a child

in Button at line line 245
FormConfigInterface getConfig()

Returns the button's configuration.

Return Value

FormConfigInterface The configuration

in Button at line line 255
bool isSubmitted()

Returns whether the button is submitted.

Return Value

bool true if the form is submitted, false otherwise

in Button at line line 265
string getName()

Returns the name by which the button is identified in forms.

Return Value

string The name of the form

in Button at line line 273
PropertyPathInterface|null getPropertyPath()

Unsupported method.

Return Value

PropertyPathInterface|null The property path

in Button at line line 282
$this addError(FormError $error)

Unsupported method.

Parameters

FormError $error

Return Value

$this

Exceptions

BadMethodCallException

in Button at line line 292
bool isValid()

Unsupported method.

Return Value

bool

in Button at line line 302
bool isRequired()

Unsupported method.

Return Value

bool

in Button at line line 310
bool isDisabled()

Returns whether this form is disabled.

The content of a disabled form is displayed, but not allowed to be modified. The validation of modified disabled forms should fail.

Forms whose parents are disabled are considered disabled regardless of their own state.

Return Value

bool

in Button at line line 324
bool isEmpty()

Unsupported method.

Return Value

bool

in Button at line line 334
bool isSynchronized()

Unsupported method.

Return Value

bool

in Button at line line 342
TransformationFailedException|null getTransformationFailure()

Unsupported method.

Return Value

TransformationFailedException|null The transformation failure

in Button at line line 351
$this initialize()

Unsupported method.

Return Value

$this

Exceptions

BadMethodCallException

in Button at line line 363
$this handleRequest(mixed $request = null)

Unsupported method.

Parameters

mixed $request The request to handle

Return Value

$this

Exceptions

BadMethodCallException

at line line 44
$this submit(mixed $submittedData, bool $clearMissing = true)

Submits data to the button.

Parameters

mixed $submittedData The submitted data
bool $clearMissing Whether to set fields to NULL when they are missing in the submitted data

Return Value

$this

Exceptions

AlreadySubmittedException if the form has already been submitted

in Button at line line 392
FormInterface getRoot()

Returns the root of the form tree.

Return Value

FormInterface The root of the tree

in Button at line line 400
bool isRoot()

Returns whether the field is the root of the form tree.

Return Value

bool

in Button at line line 408
FormView createView(FormView $parent = null)

Creates a view.

Parameters

FormView $parent

Return Value

FormView The view

in Button at line line 430
int count()

Unsupported method.

Return Value

int Always returns 0

in Button at line line 440
EmptyIterator getIterator()

Unsupported method.

Return Value

EmptyIterator Always returns an empty iterator

at line line 29
bool isClicked()

Returns whether this element was clicked.

Return Value

bool Whether this element was clicked