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

addConfig() protected method

Adds the "config" helper to the view object
protected addConfig ( Aimeos\MW\View\Iface $view, Aimeos\MW\Config\Iface $config ) : Aimeos\MW\View\Iface
$view Aimeos\MW\View\Iface View object
$config Aimeos\MW\Config\Iface Configuration object
return Aimeos\MW\View\Iface Modified view object
    protected function addConfig(\Aimeos\MW\View\Iface $view, \Aimeos\MW\Config\Iface $config)
    {
        $config = new \Aimeos\MW\Config\Decorator\Protect(clone $config, array('admin', 'client'));
        $helper = new \Aimeos\MW\View\Helper\Config\Standard($view, $config);
        $view->addHelper('config', $helper);
        return $view;
    }