Aimeos\ShopBundle\Service\View::addCsrf PHP Method

addCsrf() protected method

Adds the "access" helper to the view object
protected addCsrf ( Aimeos\MW\View\Iface $view ) : Aimeos\MW\View\Iface
$view Aimeos\MW\View\Iface View object
return Aimeos\MW\View\Iface Modified view object
    protected function addCsrf(\Aimeos\MW\View\Iface $view)
    {
        $token = $this->container->get('security.csrf.token_manager')->getToken('_token');
        $helper = new \Aimeos\MW\View\Helper\Csrf\Standard($view, '_token', $token->getValue());
        $view->addHelper('csrf', $helper);
        return $view;
    }