CouponCreationForm
class CouponCreationForm extends BaseForm
Allow to build a form Coupon
Constants
COUPON_CREATION_FORM_NAME |
|
Methods
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.
Returns the absolute URL to redirect the user to if the form is not successfully processed, using the 'error_url' form parameter value
Returns the absolute URL to redirect the user to if the form is successfully processed.
Build an absolute URL using the value of a form parameter.
Set the error message related to global form error
Get form name
Check coupon code unicity
No description
Validate a date entered with the default Language date format.
No description
Details
at line 42
__construct(
Request $request,
string $type = 'form',
array $data = array(),
array $options = array(),
ContainerInterface $container = null)
in
BaseForm at line 213
initFormWithContainer($type, $data, $options)
in
BaseForm at line 243
FormBuilderInterface
getFormBuilder()
in
BaseForm at line 251
string
getType()
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.
in
BaseForm at line 270
isTemplateDefinedHiddenFieldName($fieldName)
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
in
BaseForm at line 305
bool
hasErrorUrl()
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
in
BaseForm at line 325
bool
hasSuccessUrl()
in
BaseForm at line 337
string
getFormDefinedUrl(
string $parameterName,
string $default = null)
Build an absolute URL using the value of a form parameter.
in
BaseForm at line 352
createView()
in
BaseForm at line 363
FormView
getView()
in
BaseForm at line 380
$this
setError(
boolean $has_error = true)
Set the error status of the form.
in
BaseForm at line 392
boolean
hasError()
Get the cuirrent error status of the form.
in
BaseForm at line 403
$this
setErrorMessage(
string $message)
Set the error message related to global form error
in
BaseForm at line 416
string
getErrorMessage()
Get the form error message.
in
BaseForm at line 424
Form
getForm()
in
BaseForm at line 432
bool
hasContainer()
at line 342
string
getName()
Get form name
at line 261
checkDuplicateCouponCode(
string $value,
ExecutionContextInterface $context)
Check coupon code unicity
at line 275
checkCouponCodeChangedAndDoesntExists($value,
ExecutionContextInterface $context)
at line 296
checkLocalizedDate(
string $value,
ExecutionContextInterface $context)
Validate a date entered with the default Language date format.