protected function renderCsrfTokenField()
    {
        if (strtolower($this->arguments['method']) === 'get') {
            return '';
        }
        if (!$this->securityContext->isInitialized() || !$this->authenticationManager->isAuthenticated()) {
            return '';
        }
        $csrfToken = $this->securityContext->getCsrfProtectionToken();
        return '<input type="hidden" name="__csrfToken" value="' . htmlspecialchars($csrfToken) . '" />' . chr(10);
    }
protected function renderCsrfTokenField()
    {
        if (strtolower($this->arguments['method']) === 'get') {
            return '';
        }
        if (!$this->securityContext->isInitialized() || !$this->authenticationManager->isAuthenticated()) {
            return '';
        }
        $csrfToken = $this->securityContext->getCsrfProtectionToken();
        return '<input type="hidden" name="__csrfToken" value="' . htmlspecialchars($csrfToken) . '" />' . chr(10);
    }
protected function renderCsrfTokenField ( ) { if ( strtolower ( $ this -> arguments [ 'method' ] ) === 'get' ) { return '' ; } if ( ! $ this -> securityContext -> isInitialized ( ) || ! $ this -> authenticationManager -> isAuthenticated ( ) ) { return '' ; } $ csrfToken = $ this -> securityContext -> getCsrfProtectionToken ( ) ; return '<input type="hidden" name="__csrfToken" value="' . htmlspecialchars ( $ csrfToken ) . '" />' . chr ( 10 ) ; }
Render the a hidden field with a CSRF token

@return string the CSRF token field
Render the a hidden field with a CSRF token