class Button implements IteratorAggregate, FormInterface

A form button.

Methods

__construct(FormConfigInterface $config)

Creates a new button from a form configuration.

bool
offsetExists(mixed $offset)

Unsupported method.

offsetGet(mixed $offset)

Unsupported method.

offsetSet(mixed $offset, mixed $value)

Unsupported method.

offsetUnset(mixed $offset)

Unsupported method.

setParent(FormInterface $parent = null)

Sets the parent form.

getParent()

Returns the parent form.

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

Unsupported method.

get(string $name)

Unsupported method.

bool
has(string $name)

Unsupported method.

$this
remove(string $name)

Unsupported method.

all()

Returns all children in this group.

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

Returns the errors of this form.

$this
setData(mixed $modelData)

Unsupported method.

mixed
getData()

Unsupported method.

mixed
getNormData()

Unsupported method.

mixed
getViewData()

Unsupported method.

array
getExtraData()

Unsupported method.

getConfig()

Returns the button's configuration.

bool
isSubmitted()

Returns whether the button is submitted.

string
getName()

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

getPropertyPath()

Unsupported method.

$this
addError(FormError $error)

Unsupported method.

bool
isValid()

Unsupported method.

bool
isRequired()

Unsupported method.

bool
isDisabled()

Returns whether this form is disabled.

bool
isEmpty()

Unsupported method.

bool
isSynchronized()

Unsupported method.

$this
initialize()

Unsupported method.

$this
handleRequest(mixed $request = null)

Unsupported method.

$this
submit(null|string|array $submittedData, bool $clearMissing = true)

Submits data to the button.

getRoot()

Returns the root of the form tree.

bool
isRoot()

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

createView(FormView $parent = null)

Creates a view.

int
count()

Unsupported method.

getIterator()

Unsupported method.

Details

at line line 44
__construct(FormConfigInterface $config)

Creates a new button from a form configuration.

Parameters

FormConfigInterface $config The button's configuration

at line line 56
bool offsetExists(mixed $offset)

Unsupported method.

Parameters

mixed $offset

Return Value

bool Always returns false

at line line 70
offsetGet(mixed $offset)

Unsupported method.

This method should not be invoked.

Parameters

mixed $offset

Exceptions

BadMethodCallException

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

Unsupported method.

This method should not be invoked.

Parameters

mixed $offset
mixed $value

Exceptions

BadMethodCallException

at line line 99
offsetUnset(mixed $offset)

Unsupported method.

This method should not be invoked.

Parameters

mixed $offset

Exceptions

BadMethodCallException

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

Sets the parent form.

Parameters

FormInterface $parent The parent form or null if it's the root

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.

at line line 115
FormInterface|null getParent()

Returns the parent form.

Return Value

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

at line line 131
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

at line line 145
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

at line line 157
bool has(string $name)

Unsupported method.

Parameters

string $name The name of the child

Return Value

bool

at line line 171
$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

at line line 179
FormInterface[] all()

Returns all children in this group.

Return Value

FormInterface[]

at line line 187
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

at line line 199
$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

at line line 208
mixed getData()

Unsupported method.

Return Value

mixed

at line line 215
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.

at line line 222
mixed getViewData()

Unsupported method.

Return Value

mixed

at line line 231
array getExtraData()

Unsupported method.

Return Value

array The submitted data which do not belong to a child

at line line 241
FormConfigInterface getConfig()

Returns the button's configuration.

Return Value

FormConfigInterface The configuration

at line line 251
bool isSubmitted()

Returns whether the button is submitted.

Return Value

bool true if the form is submitted, false otherwise

at line line 261
string getName()

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

Return Value

string The name of the form

at line line 269
PropertyPathInterface getPropertyPath()

Unsupported method.

Return Value

PropertyPathInterface The property path

at line line 280
$this addError(FormError $error)

Unsupported method.

Parameters

FormError $error

Return Value

$this

Exceptions

BadMethodCallException

at line line 290
bool isValid()

Unsupported method.

Return Value

bool

at line line 300
bool isRequired()

Unsupported method.

Return Value

bool

at line line 308
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

at line line 322
bool isEmpty()

Unsupported method.

Return Value

bool

at line line 332
bool isSynchronized()

Unsupported method.

Return Value

bool

at line line 340
TransformationFailedException|null getTransformationFailure()

Unsupported method.

Return Value

TransformationFailedException|null The transformation failure

at line line 349
$this initialize()

Unsupported method.

Return Value

$this

Exceptions

BadMethodCallException

at line line 361
$this handleRequest(mixed $request = null)

Unsupported method.

Parameters

mixed $request The request to handle

Return Value

$this

Exceptions

BadMethodCallException

at line line 376
$this submit(null|string|array $submittedData, bool $clearMissing = true)

Submits data to the button.

Parameters

null|string|array $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 button has already been submitted.

at line line 390
FormInterface getRoot()

Returns the root of the form tree.

Return Value

FormInterface The root of the tree

at line line 398
bool isRoot()

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

Return Value

bool

at line line 406
FormView createView(FormView $parent = null)

Creates a view.

Parameters

FormView $parent The parent view

Return Value

FormView The view

at line line 428
int count()

Unsupported method.

Return Value

int Always returns 0

at line line 438
EmptyIterator getIterator()

Unsupported method.

Return Value

EmptyIterator Always returns an empty iterator