CsrfExtension
class CsrfExtension extends AbstractExtension
This extension protects forms by using a CSRF token.
Methods
getTypeExtensions(string $name)
Returns the extensions for the given type.
from AbstractExtension
bool
hasTypeExtensions(string $name)
Returns whether this extension provides type extensions for the given type.
from AbstractExtension
getTypeGuesser()
Returns the type guesser provided by this extension.
from AbstractExtension
__construct(CsrfTokenManagerInterface $tokenManager, TranslatorInterface $translator = null, null|string $translationDomain = null)
Constructor.
Details
in AbstractExtension at line line 53
FormTypeInterface
getType(string $name)
Returns a type by name.
in AbstractExtension at line line 69
bool
hasType(string $name)
Returns whether the given type is supported.
in AbstractExtension at line line 81
FormTypeExtensionInterface[]
getTypeExtensions(string $name)
Returns the extensions for the given type.
in AbstractExtension at line line 95
bool
hasTypeExtensions(string $name)
Returns whether this extension provides type extensions for the given type.
in AbstractExtension at line line 107
FormTypeGuesserInterface|null
getTypeGuesser()
Returns the type guesser provided by this extension.
at line line 47
__construct(CsrfTokenManagerInterface $tokenManager, TranslatorInterface $translator = null, null|string $translationDomain = null)
Constructor.