Documentation

SubmitButton extends Button
in package
implements ClickableInterface

A button that submits the form.

Tags
author

Bernhard Schussek bschussek@gmail.com

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

$parent

private mixed $parent = null

$submitted

private bool $submitted = false

Methods

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
throws
BadMethodCallException
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

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([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
FormErrorIterator

getExtraData()

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
EmptyIterator

getName()

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

public getName() : string
Return values
string

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.

getViewData()

Unsupported method.

public getViewData() : mixed

handleRequest()

Unsupported method.

public handleRequest([mixed $request = null ]) : $this
Parameters
$request : mixed = null
Tags
throws
BadMethodCallException
Return values
$this

has()

Unsupported method.

public has(string $name) : bool
Parameters
$name : string
Return values
bool

isClicked()

Returns whether this element was clicked.

public isClicked() : bool
Return values
bool

isDisabled()

Returns whether this form is disabled.

public isDisabled() : bool
Return values
bool

isEmpty()

Unsupported method.

public isEmpty() : bool
Return values
bool

isRequired()

Unsupported method.

public isRequired() : bool
Return values
bool

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

isSynchronized()

Unsupported method.

public isSynchronized() : bool
Return values
bool

isValid()

Unsupported method.

public isValid() : bool
Return values
bool

offsetExists()

Unsupported method.

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetSet()

Unsupported method.

public offsetSet(mixed $offset, mixed $value) : void

This method should not be invoked.

Parameters
$offset : mixed
$value : mixed
Tags
throws
BadMethodCallException

offsetUnset()

Unsupported method.

public offsetUnset(mixed $offset) : void

This method should not be invoked.

Parameters
$offset : mixed
Tags
throws
BadMethodCallException

remove()

Unsupported method.

public remove(string $name) : $this

This method should not be invoked.

Parameters
$name : string
Tags
throws
BadMethodCallException
Return values
$this

setData()

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
$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

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

Tags
throws
AlreadySubmittedException

if the form has already been submitted

Return values
$this

        
On this page

Search results