class StateModificationForm extends StateCreationForm

Class StateModificationForm

Traits

A trait to add standard localized description fields to a form.

Methods

__construct( Request $request, string $type = 'form', array $data = array(), array $options = array(), ContainerInterface $container = null)

No description

from  BaseForm
initFormWithContainer($type, $data, $options)

No description

from  BaseForm
FormBuilderInterface
getFormBuilder()

No description

from  BaseForm
string
getType()

No description

from  BaseForm
bool
isTemplateDefinedHiddenField( FormView $fieldView)

Return true if the given field value is defined only in the HTML template, and its value is defined in the template file, not the form builder.

from  BaseForm
isTemplateDefinedHiddenFieldName($fieldName)

No description

from  BaseForm
getRequest()

No description

from  BaseForm
string
getErrorUrl( string $default = null)

Returns the absolute URL to redirect the user to if the form is not successfully processed, using the 'error_url' form parameter value

from  BaseForm
bool
hasErrorUrl()

No description

from  BaseForm
string
getSuccessUrl( string $default = null)

Returns the absolute URL to redirect the user to if the form is successfully processed.

from  BaseForm
bool
hasSuccessUrl()

No description

from  BaseForm
string
getFormDefinedUrl( string $parameterName, string $default = null)

Build an absolute URL using the value of a form parameter.

from  BaseForm
createView()

No description

from  BaseForm
FormView
getView()

No description

from  BaseForm
$this
setError( boolean $has_error = true)

Set the error status of the form.

from  BaseForm
boolean
hasError()

Get the cuirrent error status of the form.

from  BaseForm
$this
setErrorMessage( string $message)

Set the error message related to global form error

from  BaseForm
string
getErrorMessage()

Get the form error message.

from  BaseForm
Form
getForm()

No description

from  BaseForm
bool
hasContainer()

No description

from  BaseForm
string
getName()

Override this method if you don't want to use the standard name, which is created from the full class name.

Details

in BaseForm at line 115
__construct( Request $request, string $type = 'form', array $data = array(), array $options = array(), ContainerInterface $container = null)

Parameters

Request $request
string $type
array $data
array $options
ContainerInterface $container

See also

BaseController::createForm()

in BaseForm at line 213
initFormWithContainer($type, $data, $options)

Parameters

$type
$data
$options

in BaseForm at line 243
FormBuilderInterface getFormBuilder()

Return Value

FormBuilderInterface

in BaseForm at line 251
string getType()

Return Value

string

in BaseForm at line 265
bool isTemplateDefinedHiddenField( FormView $fieldView)

Return true if the given field value is defined only in the HTML template, and its value is defined in the template file, not the form builder.

Thus, it should not be included in the form hidden fields generated by formhiddenfields Smarty function, to prevent it from existing twice in the form.

Parameters

FormView $fieldView

Return Value

bool

in BaseForm at line 270
isTemplateDefinedHiddenFieldName($fieldName)

Parameters

$fieldName

in BaseForm at line 278
Request getRequest()

Return Value

Request

in BaseForm at line 297
string getErrorUrl( string $default = null)

Returns the absolute URL to redirect the user to if the form is not successfully processed, using the 'error_url' form parameter value

Parameters

string $default the default URL. If not given, the configured base URL is used.

Return Value

string an absolute URL

in BaseForm at line 305
bool hasErrorUrl()

Return Value

bool true if an error URL is defined in the 'error_url' form parameter, false otherwise

in BaseForm at line 317
string getSuccessUrl( string $default = null)

Returns the absolute URL to redirect the user to if the form is successfully processed.

using the 'success_url' form parameter value

Parameters

string $default the default URL. If not given, the configured base URL is used.

Return Value

string an absolute URL

in BaseForm at line 325
bool hasSuccessUrl()

Return Value

bool true if a success URL is defined in the form, false otherwise

in BaseForm at line 337
string getFormDefinedUrl( string $parameterName, string $default = null)

Build an absolute URL using the value of a form parameter.

Parameters

string $parameterName the form parameter name
string $default a default value for the form parameter. If not defined, the configured base URL is used.

Return Value

string an absolute URL

in BaseForm at line 352
createView()

in BaseForm at line 363
FormView getView()

Return Value

FormView

Exceptions

LogicException

in BaseForm at line 380
$this setError( boolean $has_error = true)

Set the error status of the form.

Parameters

boolean $has_error

Return Value

$this

in BaseForm at line 392
boolean hasError()

Get the cuirrent error status of the form.

Return Value

boolean

in BaseForm at line 403
$this setErrorMessage( string $message)

Set the error message related to global form error

Parameters

string $message

Return Value

$this

in BaseForm at line 416
string getErrorMessage()

Get the form error message.

Return Value

string

in BaseForm at line 424
Form getForm()

Return Value

Form

in BaseForm at line 432
bool hasContainer()

Return Value

bool

at line 36
string getName()

Override this method if you don't want to use the standard name, which is created from the full class name.

Return Value

string the name of you form. This name must be unique