ParserContext
class ParserContext implements IteratorAggregate
The parser context is an application-wide context, which stores var-value pairs.
Theses pairs are injected in the parser and becomes available to the templates.
Constants
FORM_ERROR_LIFETIME_SECONDS |
|
Methods
__construct(
RequestStack $requestStack,
TheliaFormFactoryInterface $formFactory,
TheliaFormValidatorInterface $formValidator)
No description
$this
pushCurrentForm(
BaseForm $form)
Set the current form
BaseForm|null
getCurrentForm()
No description
$this
addForm(
BaseForm $form)
Add a new form to the error form context
null|BaseForm
getForm(
string $formId,
string $formClass,
string $formType)
Check if the specified form has errors, and return an instance of this form if it's the case.
$this
clearForm(
BaseForm $form)
Remove form from the saved form error information.
setGeneralError($error)
No description
set($name, $value)
No description
remove($name)
No description
get($name, $default = null)
No description
getIterator()
No description
getSession()
No description
Details
at line 46
__construct(
RequestStack $requestStack,
TheliaFormFactoryInterface $formFactory,
TheliaFormValidatorInterface $formValidator)
at line 68
$this
pushCurrentForm(
BaseForm $form)
Set the current form
at line 92
getCurrentForm()
at line 132
$this
addForm(
BaseForm $form)
Add a new form to the error form context
at line 161
null|BaseForm
getForm(
string $formId,
string $formClass,
string $formType)
Check if the specified form has errors, and return an instance of this form if it's the case.
at line 214
$this
clearForm(
BaseForm $form)
Remove form from the saved form error information.