BaseForm
class BaseForm
Base form class for creating form objects
Class BaseForm
Methods
No description
No description
No description
No description
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.
No description
No description
Returns the absolute URL to redirect the user to if the form is not successfully processed, using the 'error_url' form parameter value
No description
Returns the absolute URL to redirect the user to if the form is successfully processed.
No description
Build an absolute URL using the value of a form parameter.
No description
No description
Set the error status of the form.
Get the cuirrent error status of the form.
Set the error message related to global form error
Get the form error message.
No description
No description
Override this method if you don't want to use the standard name, which is created from the full class name.
Details
at line 115
__construct(
Request $request,
string $type = 'form',
array $data = array(),
array $options = array(),
ContainerInterface $container = null)
at line 213
initFormWithContainer($type, $data, $options)
at line 243
FormBuilderInterface
getFormBuilder()
at line 251
string
getType()
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.
at line 270
isTemplateDefinedHiddenFieldName($fieldName)
at line 278
Request
getRequest()
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
at line 305
bool
hasErrorUrl()
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
at line 325
bool
hasSuccessUrl()
at line 337
string
getFormDefinedUrl(
string $parameterName,
string $default = null)
Build an absolute URL using the value of a form parameter.
at line 352
createView()
at line 363
FormView
getView()
at line 380
$this
setError(
boolean $has_error = true)
Set the error status of the form.
at line 392
boolean
hasError()
Get the cuirrent error status of the form.
at line 403
$this
setErrorMessage(
string $message)
Set the error message related to global form error
at line 416
string
getErrorMessage()
Get the form error message.
at line 424
Form
getForm()
at line 432
bool
hasContainer()
at line 442
string
getName()
Override this method if you don't want to use the standard name, which is created from the full class name.