Aimeos\Shop\Base\View::addUrl PHP Method

addUrl() protected method

Adds the "url" helper to the view object
protected addUrl ( 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 addUrl(\Aimeos\MW\View\Iface $view)
    {
        $fixed = array();
        if (Route::current()) {
            if (($value = Route::input('site')) !== null) {
                $fixed['site'] = $value;
            }
            if (($value = Route::input('locale')) !== null) {
                $fixed['locale'] = $value;
            }
            if (($value = Route::input('currency')) !== null) {
                $fixed['currency'] = $value;
            }
        }
        $helper = new \Aimeos\MW\View\Helper\Url\Laravel5($view, app('url'), $fixed);
        $view->addHelper('url', $helper);
        return $view;
    }