PHP Class Neos\FluidAdaptor\ViewHelpers\Security\CsrfTokenViewHelper

..). Note: You won't need this ViewHelper if you use the Form ViewHelper, because that creates a hidden field with the CSRF token for unsafe requests automatically. This ViewHelper is mainly useful in conjunction with AJAX. = Examples =
...
Now, the CSRF token can be extracted via JavaScript to be appended to requests, for example with jQuery: jQuery (exemplary): $.ajax({ url: '', type: 'POST', data: { __csrfToken: $('#someDiv').attr('data-csrf-token') } });
Inheritance: extends Neos\FluidAdaptor\Core\ViewHelper\AbstractViewHelper
Show file Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$securityContext Neos\Flow\Security\Context

Public Methods

Method Description
render ( ) : string

Method Details

render() public method

public render ( ) : string
return string

Property Details

$securityContext protected property

protected Context,Neos\Flow\Security $securityContext
return Neos\Flow\Security\Context