Adds the "url" helper to the view object

@param \Aimeos\MW\View\Iface $view View object
@return \Aimeos\MW\View\Iface Modified view object
338182
protected function addUrl( \Aimeos\MW\View\Iface $view )
	{
		$fixed = array();
		$request = $this->requestStack->getMasterRequest();

		if( $request !== null )
		{
			$attr = $request->attributes;

			if( ( $site = $attr->get( 'site' ) ) !== null ) {
				$fixed['site'] = $site;
			}

			if( ( $lang = $attr->get( 'locale' ) ) !== null ) {
				$fixed['locale'] = $lang;
			}

			if( ( $currency = $attr->get( 'currency' ) ) !== null ) {
				$fixed['currency'] = $currency;
			}
		}

		$helper = new \Aimeos\MW\View\Helper\Url\Symfony2( $view, $this->container->get( 'router' ), $fixed );
		$view->addHelper( 'url', $helper );

		return $view;
	}
256131
public function convertView($view)
    {
        if (strpos($view, '@') !== false || strpos($view, '/') !== false || strpos($view, '\\') !== false) {
            return $view;
        }
        return strtolower(substr(static::className(), strrpos(static::className(), '\\') + 1)) . '-' . $view;
    }
490250
public function setView( \Aimeos\MW\View\Iface $view )
	{
		parent::setView( $view );

		// set first to be able to show errors occuring afterwards
		$view->pageParams = $this->getClientParams();
		$context = $this->getContext();

		$siteManager = \Aimeos\MShop::create( $context, 'locale/site' );
		$langManager = \Aimeos\MShop::create( $context, 'locale/language' );
		$customerManager = \Aimeos\MShop::create( $context, 'customer' );

		$siteItem = $siteManager->findItem( $view->param( 'site', 'default' ) );

		try {
			$siteid = $customerManager->getItem( $context->getUserId() )->getSiteId() ?: $siteItem->getSiteId();
		} catch( \Exception $e ) {
			$siteid = $siteItem->getSiteId();
		}

		if( $view->access( ['admin', 'super'] ) ) {
			$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE;
		} else {
			$level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE;
		}

		$sitePath = $siteManager->getPath( $siteid );

		$view->pageI18nList = $this->getAimeos()->getI18nList( 'admin' );
		$view->pageLangItems = $langManager->searchItems( $langManager->createSearch( true ) );
		$view->pageSiteTree = $siteManager->getTree( $siteid, [], $level );
		$view->pageSitePath = $sitePath;
		$view->pageSiteItem = $siteItem;

		if( $view->access( ['super'] ) )
		{
			$search = $siteManager->createSearch()->setSlice( 0, 1000 );
			$search->setSortations( [$search->sort( '+', 'locale.site.label')] );
			$search->setConditions( $search->compare( '==', 'locale.site.level', 0 ) );

			$view->pageSiteList = $siteManager->searchItems( $search );

			if( ( $rootItem = reset( $sitePath ) ) !== false ) {
				$view->pageSiteTree = $siteManager->getTree( $rootItem->getId(), [], $level );
			}
		}
		else
		{
			$view->pageSiteList = [$view->pageSiteTree];
		}

		$this->getClient()->setView( $view );
		return $this;
	}
605229
public function & SetView (\MvcCore\IView & $view) {
		parent::SetView($view);
		return $this->SetLangAndLocale($this->request->GetLang(), $this->request->GetLocale());
	}
694302
protected static function addResponse( \Aimeos\MW\View\Iface $view )
	{
		if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response'] )
			&& is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response'] ) )
		) {
			return $fcn( $view );
		}

		$helper = new \Aimeos\MW\View\Helper\Response\Typo3( $view );
		$view->addHelper( 'response', $helper );

		return $view;
	}
515461
protected function setAddress( \Aimeos\MW\View\Iface $view )
	{
		$context = $this->getContext();
		$basketCtrl = \Aimeos\Controller\Frontend::create( $context, 'basket' );


		/** client/html/checkout/standard/address/billing/disable-new
		 * Disables the option to enter a new billing address for an order
		 *
		 * Besides the main billing address, customers can usually enter a new
		 * billing address as well. To suppress displaying the form fields for
		 * a billing address, you can set this configuration option to "1".
		 *
		 * Until 2015-02, the configuration option was available as
		 * "client/html/common/address/billing/disable-new" starting from 2014-03.
		 *
		 * @param boolean A value of "1" to disable, "0" enables the billing address form
		 * @since 2015.02
		 * @category User
		 * @category Developer
		 * @see client/html/checkout/standard/address/billing/salutations
		 * @see client/html/checkout/standard/address/billing/mandatory
		 * @see client/html/checkout/standard/address/billing/optional
		 * @see client/html/checkout/standard/address/billing/hidden
		*/
		$disable = $view->config( 'client/html/checkout/standard/address/billing/disable-new', false );
		$type = \Aimeos\MShop\Order\Item\Base\Address\Base::TYPE_PAYMENT;

		if( ( $option = $view->param( 'ca_billingoption', 'null' ) ) === 'null' && $disable === false ) // new address
		{
			$params = $view->param( 'ca_billing', [] );

			if( ( $view->billingError = $this->checkFields( $params ) ) !== [] ) {
				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one billing address part is missing or invalid' ) );
			}
		}
		else // existing address
		{
			$params = $view->param( 'ca_billing_' . $option, [] ) + $view->param( 'ca_extra', [] );

			if( !empty( $params ) && ( $view->billingError = $this->checkFields( $params ) ) !== [] ) {
				throw new \Aimeos\Client\Html\Exception( sprintf( 'At least one billing address part is missing or invalid' ) );
			}

			$cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' )->uses( [] );
			$params = $cntl->add( $params )->store()->get()->getPaymentAddress()->toArray();
		}

		$basketCtrl->addAddress( $type, $params, 0 );
	}
645458
public function setView(\Zend_View_Interface $view = null) {
        /**
         * If the form is populated... and we have a tab set... select it
         */
        $tab = $this->getValue('tab');
        if ($tab > 0) {
            $this->selectTab($tab);
        }

        parent::setView($view);

        if ($this->_view !== $view) {
            $this->activateJQuery();
        }

        return $this;
    }
1053742
public function buildUrl(string $key, View $view, N2nLocale $n2nLocale) {
		return $view->buildUrlStr(MurlPage::id($key)->locale($n2nLocale));
	}
41582
protected function view( $view ) {
		if ( preg_match( '/\.\w+$/', $view, $matches ) && in_array( $matches[0], $this->extensions() ) ) {
			return str_replace( '.', '/', preg_replace( '/' . $matches[0] . '$/', '', $view ) ) . $matches[0];
		}

		return $this->extension( str_replace( '.', '/', $view ) );
	}
834802
public function setView(\Zend_View_Interface $view = null) {
        if (null !== $view) {
            if (false === $view->getPluginLoader('helper')->getPaths('CKEditor_View_Helper')) {
                $view->addHelperPath('CKEditor/View/Helper', 'CKEditor_View_Helper');
            }
        }

        if (!file_exists($this->basePath . '/ckeditor.js')) {
            throw new \Zend_Exception('Use setBasePath() to set the full path to the file ckeditor.php in the public folder of ckedit.');
        }

        return parent::setView($view);
    }
866946
protected function populateView($view)
    {
        $view = $this->initViewVars($view);
        $view = $this->initViewContentBlocks($view);

        return $view;
    }
113260
protected function getParts( \Aimeos\MW\View\Iface $view )
	{
		$available = array(
			'basket/address' => \Aimeos\MShop\Order\Item\Base\Base::PARTS_ADDRESS,
			'basket/coupon' => \Aimeos\MShop\Order\Item\Base\Base::PARTS_COUPON,
			'basket/product' => \Aimeos\MShop\Order\Item\Base\Base::PARTS_PRODUCT,
			'basket/service' => \Aimeos\MShop\Order\Item\Base\Base::PARTS_SERVICE,
		);

		$included = explode( ',', $view->param( 'included', 'basket/address,basket/coupon,basket/product,basket/service' ) );

		$parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_NONE;
		foreach( $included as $type )
		{
			if( isset( $available[$type] ) ) {
				$parts |= $available[$type];
			}
		}

		return $parts;
	}
1071381
private static function add_view($path, $mode, mvc\view $view)
  {
    if ( !isset(self::$loaded_views[$mode][$path]) ){
      self::$loaded_views[$mode][$path] = $view;
    }
    return self::$loaded_views[$mode][$path];
  }
915890
public function getView($view)
    {
        if (Template::exists('Form/' . $view)) {
            return Template::getAdminTemplate('Form/' . $view);
        }

        return new View($view, B8_PATH . 'Form/View/');
    }
279241
public function setView($view)
    {
        parent::setView($view);

        if (!$this->_view instanceof LibBaseViewAbstract) {
            $view = AnInflector::isPlural($view) ? 'comments' : 'comment';
            $defaults[] = 'ComBaseView'.ucfirst($view).ucfirst($this->_view->name);
            register_default(array(
                'identifier' => $this->_view,
                'default' => $defaults, ));
        }

        return $this;
    }
189256
protected function addCoupon( \Aimeos\MW\View\Iface $view )
	{
		if( ( $coupon = $view->param( 'b_coupon' ) ) != '' )
		{
			\Aimeos\Controller\Frontend::create( $this->getContext(), 'basket' )->addCoupon( $coupon );
			$this->clearCached();
		}
	}
386963
protected function addViewData( \Aimeos\MW\View\Iface $view )
	{
		$context = $this->getContext();

		$textTypeManager = \Aimeos\MShop::create( $context, 'text/type' );
		$listTypeManager = \Aimeos\MShop::create( $context, 'product/lists/type' );

		$search = $textTypeManager->createSearch( true )->setSlice( 0, 10000 );
		$search->setConditions( $search->compare( '==', 'text.type.domain', 'product' ) );
		$search->setSortations( array( $search->sort( '+', 'text.type.position' ) ) );

		$listSearch = $listTypeManager->createSearch( true )->setSlice( 0, 10000 );
		$listSearch->setConditions( $listSearch->compare( '==', 'product.lists.type.domain', 'text' ) );
		$listSearch->setSortations( array( $listSearch->sort( '+', 'product.lists.type.position' ) ) );

		$view->textTypes = $this->map( $textTypeManager->searchItems( $search ) );
		$view->textListTypes = $this->map( $listTypeManager->searchItems( $listSearch ) );

		return $view;
	}