W3cubDocs

/Symfony 2.7

Symfony\Component\Form\SubmitButtonBuilder

class SubmitButtonBuilder extends ButtonBuilder

A builder for {@link SubmitButton} instances.

Methods

__construct(string $name, array $options = array())

Creates a new button builder.

from ButtonBuilder
FormBuilderInterface add(string|integer|FormBuilderInterface $child, string|FormTypeInterface $type = null, array $options = array())

Unsupported method.

from ButtonBuilder
FormBuilderInterface create(string $name, string|FormTypeInterface $type = null, array $options = array())

Unsupported method.

from ButtonBuilder
FormBuilderInterface get(string $name)

Unsupported method.

from ButtonBuilder
FormBuilderInterface remove(string $name)

Unsupported method.

from ButtonBuilder
Boolean has(string $name)

Unsupported method.

from ButtonBuilder
array all()

Returns the children.

from ButtonBuilder
SubmitButton getForm()

Creates the button.

FormConfigBuilderInterface addEventListener(string $eventName, callable $listener, integer $priority)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface addEventSubscriber(EventSubscriberInterface $subscriber)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface addViewTransformer(DataTransformerInterface $viewTransformer, Boolean $forcePrepend = false)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface resetViewTransformers()

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface addModelTransformer(DataTransformerInterface $modelTransformer, Boolean $forceAppend = false)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface resetModelTransformers()

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setAttribute(string $name, string $value)

Sets the value for an attribute.

from ButtonBuilder
FormConfigBuilderInterface setAttributes(array $attributes)

Sets the attributes.

from ButtonBuilder
FormConfigBuilderInterface setDataMapper(DataMapperInterface $dataMapper = null)

Unsupported method.

from ButtonBuilder
ButtonBuilder setDisabled(Boolean $disabled)

Set whether the button is disabled.

from ButtonBuilder
FormConfigBuilderInterface setEmptyData(mixed $emptyData)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setErrorBubbling(Boolean $errorBubbling)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setRequired(Boolean $required)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setPropertyPath(null $propertyPath)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setMapped(Boolean $mapped)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setByReference(Boolean $byReference)

Unsupported method.

from ButtonBuilder
setVirtual(Boolean $virtual)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setCompound(Boolean $compound)

Unsupported method.

from ButtonBuilder
ButtonBuilder setType(ResolvedFormTypeInterface $type)

Sets the type of the button.

from ButtonBuilder
FormConfigBuilderInterface setData(array $data)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setDataLocked(Boolean $locked)

Unsupported method.

from ButtonBuilder
void setFormFactory(FormFactoryInterface $formFactory)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setAction(string $action)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setMethod(string $method)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setRequestHandler(RequestHandlerInterface $requestHandler)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setAutoInitialize(Boolean $initialize)

Unsupported method.

from ButtonBuilder
FormConfigBuilderInterface setInheritData(Boolean $inheritData)

Unsupported method.

from ButtonBuilder
FormConfigInterface getFormConfig()

Builds and returns the button configuration.

from ButtonBuilder
null getEventDispatcher()

Unsupported method.

from ButtonBuilder
string getName()

Returns the name of the form used as HTTP parameter.

from ButtonBuilder
null getPropertyPath()

Unsupported method.

from ButtonBuilder
Boolean getMapped()

Unsupported method.

from ButtonBuilder
Boolean getByReference()

Unsupported method.

from ButtonBuilder
Boolean getVirtual()

Unsupported method.

from ButtonBuilder
Boolean getCompound()

Unsupported method.

from ButtonBuilder
ResolvedFormTypeInterface getType()

Returns the form type used to construct the button.

from ButtonBuilder
array getViewTransformers()

Unsupported method.

from ButtonBuilder
array getModelTransformers()

Unsupported method.

from ButtonBuilder
null getDataMapper()

Unsupported method.

from ButtonBuilder
Boolean getRequired()

Unsupported method.

from ButtonBuilder
Boolean getDisabled()

Returns whether the button is disabled.

from ButtonBuilder
Boolean getErrorBubbling()

Unsupported method.

from ButtonBuilder
null getEmptyData()

Unsupported method.

from ButtonBuilder
array getAttributes()

Returns additional attributes of the button.

from ButtonBuilder
Boolean hasAttribute(string $name)

Returns whether the attribute with the given name exists.

from ButtonBuilder
mixed getAttribute(string $name, mixed $default = null)

Returns the value of the given attribute.

from ButtonBuilder
null getData()

Unsupported method.

from ButtonBuilder
null getDataClass()

Unsupported method.

from ButtonBuilder
Boolean getDataLocked()

Unsupported method.

from ButtonBuilder
null getFormFactory()

Unsupported method.

from ButtonBuilder
null getAction()

Unsupported method.

from ButtonBuilder
null getMethod()

Unsupported method.

from ButtonBuilder
null getRequestHandler()

Unsupported method.

from ButtonBuilder
Boolean getAutoInitialize()

Unsupported method.

from ButtonBuilder
Boolean getInheritData()

Unsupported method.

from ButtonBuilder
array getOptions()

Returns all options passed during the construction of the button.

from ButtonBuilder
Boolean hasOption(string $name)

Returns whether a specific option exists.

from ButtonBuilder
mixed getOption(string $name, mixed $default = null)

Returns the value of a specific option.

from ButtonBuilder
integer count()

Unsupported method.

from ButtonBuilder
EmptyIterator getIterator()

Unsupported method.

from ButtonBuilder

Details

public __construct(string $name, array $options = array())

Creates a new button builder.

Parameters

string $name The name of the button.
array $options The button's options.

Exceptions

InvalidArgumentException If the name is empty.

public FormBuilderInterface add(string|integer|FormBuilderInterface $child, string|FormTypeInterface $type = null, array $options = array())

Unsupported method.

This method should not be invoked.

Parameters

string|integer|FormBuilderInterface $child
string|FormTypeInterface $type
array $options

Return Value

FormBuilderInterface The builder object.

Exceptions

BadMethodCallException

public FormBuilderInterface create(string $name, string|FormTypeInterface $type = null, array $options = array())

Unsupported method.

This method should not be invoked.

Parameters

string $name The name of the form or the name of the property
string|FormTypeInterface $type The type of the form or null if name is a property
array $options The options

Return Value

FormBuilderInterface The created builder.

Exceptions

BadMethodCallException

public FormBuilderInterface get(string $name)

Unsupported method.

This method should not be invoked.

Parameters

string $name The name of the child

Return Value

FormBuilderInterface The builder for the child

Exceptions

BadMethodCallException

public FormBuilderInterface remove(string $name)

Unsupported method.

This method should not be invoked.

Parameters

string $name

Return Value

FormBuilderInterface The builder object.

Exceptions

BadMethodCallException

public Boolean has(string $name)

Unsupported method.

Parameters

string $name

Return Value

Boolean Always returns false.

public array all()

Returns the children.

Return Value

array Always returns an empty array.

public SubmitButton getForm()

Creates the button.

Return Value

SubmitButton The button

public FormConfigBuilderInterface addEventListener(string $eventName, callable $listener, integer $priority)

Unsupported method.

This method should not be invoked.

Parameters

string $eventName The name of the event to listen to.
callable $listener The listener to execute.
integer $priority The priority of the listener. Listeners with a higher priority are called before listeners with a lower priority.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface addEventSubscriber(EventSubscriberInterface $subscriber)

Unsupported method.

This method should not be invoked.

Parameters

EventSubscriberInterface $subscriber The subscriber to attach.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface addViewTransformer(DataTransformerInterface $viewTransformer, Boolean $forcePrepend = false)

Unsupported method.

This method should not be invoked.

Parameters

DataTransformerInterface $viewTransformer
Boolean $forcePrepend if set to true, prepend instead of appending

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface resetViewTransformers()

Unsupported method.

This method should not be invoked.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface addModelTransformer(DataTransformerInterface $modelTransformer, Boolean $forceAppend = false)

Unsupported method.

This method should not be invoked.

Parameters

DataTransformerInterface $modelTransformer
Boolean $forceAppend if set to true, append instead of prepending

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface resetModelTransformers()

Unsupported method.

This method should not be invoked.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setAttribute(string $name, string $value)

Sets the value for an attribute.

Parameters

string $name The name of the attribute
string $value The value of the attribute

Return Value

FormConfigBuilderInterface The configuration object.

public FormConfigBuilderInterface setAttributes(array $attributes)

Sets the attributes.

Parameters

array $attributes The attributes.

Return Value

FormConfigBuilderInterface The configuration object.

public FormConfigBuilderInterface setDataMapper(DataMapperInterface $dataMapper = null)

Unsupported method.

This method should not be invoked.

Parameters

DataMapperInterface $dataMapper

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public ButtonBuilder setDisabled(Boolean $disabled)

Set whether the button is disabled.

Parameters

Boolean $disabled Whether the button is disabled

Return Value

ButtonBuilder The button builder.

public FormConfigBuilderInterface setEmptyData(mixed $emptyData)

Unsupported method.

This method should not be invoked.

Parameters

mixed $emptyData The empty data.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setErrorBubbling(Boolean $errorBubbling)

Unsupported method.

This method should not be invoked.

Parameters

Boolean $errorBubbling

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setRequired(Boolean $required)

Unsupported method.

This method should not be invoked.

Parameters

Boolean $required

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setPropertyPath(null $propertyPath)

Unsupported method.

This method should not be invoked.

Parameters

null $propertyPath The property path or null if the path should be set automatically based on the form's name.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setMapped(Boolean $mapped)

Unsupported method.

This method should not be invoked.

Parameters

Boolean $mapped Whether the form should be mapped.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setByReference(Boolean $byReference)

Unsupported method.

This method should not be invoked.

Parameters

Boolean $byReference Whether the data should be modified by reference.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public setVirtual(Boolean $virtual)

Unsupported method.

This method should not be invoked.

Parameters

Boolean $virtual

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setCompound(Boolean $compound)

Unsupported method.

This method should not be invoked.

Parameters

Boolean $compound Whether the form should be compound.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public ButtonBuilder setType(ResolvedFormTypeInterface $type)

Sets the type of the button.

Parameters

ResolvedFormTypeInterface $type The type of the button.

Return Value

ButtonBuilder The button builder.

public FormConfigBuilderInterface setData(array $data)

Unsupported method.

This method should not be invoked.

Parameters

array $data The data of the form in application format.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setDataLocked(Boolean $locked)

Unsupported method.

This method should not be invoked.

Parameters

Boolean $locked Whether to lock the default data.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public void setFormFactory(FormFactoryInterface $formFactory)

Unsupported method.

This method should not be invoked.

Parameters

FormFactoryInterface $formFactory The form factory.

Return Value

void

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setAction(string $action)

Unsupported method.

Parameters

string $action The target URL of the form.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setMethod(string $method)

Unsupported method.

Parameters

string $method The HTTP method of the form.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setRequestHandler(RequestHandlerInterface $requestHandler)

Unsupported method.

Parameters

RequestHandlerInterface $requestHandler

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setAutoInitialize(Boolean $initialize)

Unsupported method.

Parameters

Boolean $initialize True to initialize the form automatically, false to suppress automatic initialization. In the second case, you need to call {@link FormInterface::initialize()} manually.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigBuilderInterface setInheritData(Boolean $inheritData)

Unsupported method.

Parameters

Boolean $inheritData Whether the form should inherit its parent's data.

Return Value

FormConfigBuilderInterface The configuration object.

Exceptions

BadMethodCallException

public FormConfigInterface getFormConfig()

Builds and returns the button configuration.

Return Value

FormConfigInterface

public null getEventDispatcher()

Unsupported method.

Return Value

null Always returns null.

public string getName()

Returns the name of the form used as HTTP parameter.

Return Value

string The form name.

public null getPropertyPath()

Unsupported method.

Return Value

null Always returns null.

public Boolean getMapped()

Unsupported method.

Return Value

Boolean Always returns false.

public Boolean getByReference()

Unsupported method.

Return Value

Boolean Always returns false.

public Boolean getVirtual()

Unsupported method.

Return Value

Boolean Always returns false.

public Boolean getCompound()

Unsupported method.

Return Value

Boolean Always returns false.

public ResolvedFormTypeInterface getType()

Returns the form type used to construct the button.

Return Value

ResolvedFormTypeInterface The button's type.

public array getViewTransformers()

Unsupported method.

Return Value

array Always returns an empty array.

public array getModelTransformers()

Unsupported method.

Return Value

array Always returns an empty array.

public null getDataMapper()

Unsupported method.

Return Value

null Always returns null.

public Boolean getRequired()

Unsupported method.

Return Value

Boolean Always returns false.

public Boolean getDisabled()

Returns whether the button is disabled.

Return Value

Boolean Whether the button is disabled.

public Boolean getErrorBubbling()

Unsupported method.

Return Value

Boolean Always returns false.

public null getEmptyData()

Unsupported method.

Return Value

null Always returns null.

public array getAttributes()

Returns additional attributes of the button.

Return Value

array An array of key-value combinations.

public Boolean hasAttribute(string $name)

Returns whether the attribute with the given name exists.

Parameters

string $name The attribute name.

Return Value

Boolean Whether the attribute exists.

public mixed getAttribute(string $name, mixed $default = null)

Returns the value of the given attribute.

Parameters

string $name The attribute name.
mixed $default The value returned if the attribute does not exist.

Return Value

mixed The attribute value.

public null getData()

Unsupported method.

Return Value

null Always returns null.

public null getDataClass()

Unsupported method.

Return Value

null Always returns null.

public Boolean getDataLocked()

Unsupported method.

Return Value

Boolean Always returns false.

public null getFormFactory()

Unsupported method.

Return Value

null Always returns null.

public null getAction()

Unsupported method.

Return Value

null Always returns null.

public null getMethod()

Unsupported method.

Return Value

null Always returns null.

public null getRequestHandler()

Unsupported method.

Return Value

null Always returns null.

public Boolean getAutoInitialize()

Unsupported method.

Return Value

Boolean Always returns false.

public Boolean getInheritData()

Unsupported method.

Return Value

Boolean Always returns false.

public array getOptions()

Returns all options passed during the construction of the button.

Return Value

array The passed options.

public Boolean hasOption(string $name)

Returns whether a specific option exists.

Parameters

string $name The option name,

Return Value

Boolean Whether the option exists.

public mixed getOption(string $name, mixed $default = null)

Returns the value of a specific option.

Parameters

string $name The option name.
mixed $default The value returned if the option does not exist.

Return Value

mixed The option value.

public integer count()

Unsupported method.

Return Value

integer Always returns 0.

public EmptyIterator getIterator()

Unsupported method.

Return Value

EmptyIterator Always returns an empty iterator.

© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.7/Symfony/Component/Form/SubmitButtonBuilder.html