Csrf\CsrfExtension (Component\Form\Extension)
Symfony\Component\Form\Extension\Csrf\CsrfExtension
class CsrfExtension extends AbstractExtension
This extension protects forms by using a CSRF token.
Methods
FormTypeInterface | getType(string $name) Returns a type by name. | from AbstractExtension |
bool | hasType(string $name) Returns whether the given type is supported. | from AbstractExtension |
FormTypeExtensionInterface[] | 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 |
FormTypeGuesserInterface|null | getTypeGuesser() Returns the type guesser provided by this extension. | from AbstractExtension |
__construct(CsrfTokenManagerInterface $tokenManager, TranslatorInterface $translator = null, null|string $translationDomain = null) Constructor. |
Details
public FormTypeInterface getType(string $name)
Returns a type by name.
public bool hasType(string $name)
Returns whether the given type is supported.
public FormTypeExtensionInterface[] getTypeExtensions(string $name)
Returns the extensions for the given type.
public bool hasTypeExtensions(string $name)
Returns whether this extension provides type extensions for the given type.
public FormTypeGuesserInterface|null getTypeGuesser()
Returns the type guesser provided by this extension.
public __construct(CsrfTokenManagerInterface $tokenManager, TranslatorInterface $translator = null, null|string $translationDomain = null)
Constructor.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/Form/Extension/Csrf/CsrfExtension.html