Adds the "request" helper to the view object

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

		if( $request !== null )
		{
			$helper = new \Aimeos\MW\View\Helper\Request\Symfony2( $view, $request );
			$view->addHelper( 'request', $helper );
		}

		return $view;
	}
1374913
protected function addViewData( \Aimeos\MW\View\Iface $view )
	{
		$manager = \Aimeos\MShop::create( $this->getContext(), 'media/property/type' );

		$search = $manager->createSearch( true )->setSlice( 0, 10000 );
		$search->setConditions( $search->compare( '==', 'media.property.type.domain', 'service' ) );
		$search->setSortations( [$search->sort( '+', 'media.property.type.position')] );

		$view->propertyTypes = $this->map( $manager->searchItems( $search ) );

		return $view;
	}
868598
public function setView($view)
	{
		$this->view = $view;

		// construct the view if needed
		if ( ! $this->view instanceof View)
		{
			$this->view = $this->viewManager->forge($this->view);
		}
	}
453846
public function displayAndHandle(ContentValueView $view, Request $request)
    {
        $parameters = $this->collectInformation($view, $request);

        $view->addParameters($parameters);

        if ($view instanceof CachableView) {
            $view->setCacheEnabled(false);
        }

        return $view;
    }
904647
public function setView($view)
    {
        $view   = parent::setView($view);
        $format = $this->getRequest()->getFormat();

        if ($view instanceof KObjectIdentifier && $view->getPackage() != 'activities' && $format  !== 'html')
        {
            $manager = $this->getObject('manager');

            // Set the view identifier as an alias of the component view.
            if (!$manager->getClass($view, false))
            {
                $identifier = $view->toArray();
                $identifier['package'] = 'activities';
                unset($identifier['domain']);

                $manager->registerAlias($identifier, $view);
            }
        }

        return $view;
    }
109680
public function view($view = null)
    {
        if (empty($view)) {
            return $this->getConfig('view') ?: $this->_request()->getParam('action');
        }

        return $this->setConfig('view', $view);
    }
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;
	}
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;
    }
195031
protected function addViewData( \Aimeos\MW\View\Iface $view )
	{
		$context = $this->getContext();

		$typeManager = \Aimeos\MShop::create( $this->getContext(), 'media/type' );
		$listTypeManager = \Aimeos\MShop::create( $this->getContext(), 'attribute/lists/type' );

		$search = $typeManager->createSearch( true )->setSlice( 0, 10000 );
		$search->setConditions( $search->compare( '==', 'media.type.domain', 'attribute' ) );
		$search->setSortations( [$search->sort( '+', 'media.type.position' )] );

		$listSearch = $listTypeManager->createSearch( true )->setSlice( 0, 10000 );
		$listSearch->setConditions( $listSearch->compare( '==', 'attribute.lists.type.domain', 'media' ) );
		$listSearch->setSortations( [$listSearch->sort( '+', 'attribute.lists.type.position' )] );

		$view->mediaListTypes = $this->map( $listTypeManager->searchItems( $listSearch ) );
		$view->mediaTypes = $this->map( $typeManager->searchItems( $search ) );

		return $view;
	}
547501
protected function extension( $view ) {
		$extensions = $this->extensions();

		// Return if a valid extension exists in the template string.
		$ext_reg = '/(' . implode( '|', $extensions ) . ')+$/';
		if ( preg_match( $ext_reg, $view ) ) {
			return $template;
		}

		// Add extension to template string if it don't exists.
		return substr( $view, -strlen( $extensions[0] ) ) === $extensions[0]
			? $view : $view . $extensions[0];
	}
811165
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;
	}
109828
protected function addParam( \Aimeos\MW\View\Iface $view )
	{
		$params = array();
		$request = $this->requestStack->getMasterRequest();

		if( $request !== null ) {
			$params = $request->request->all() + $request->query->all() + $request->attributes->get( '_route_params' );
		}

		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $params );
		$view->addHelper( 'param', $helper );

		return $view;
	}
1182097
protected function getProductListSize( \Aimeos\MW\View\Iface $view )
	{
		/** client/html/account/favorite/size
		 * The number of products shown in a list page for favorite products
		 *
		 * Limits the number of products that is shown in the list pages to the
		 * given value. If more products are available, the products are split
		 * into bunches which will be shown on their own list page. The user is
		 * able to move to the next page (or previous one if it's not the first)
		 * to display the next (or previous) products.
		 *
		 * The value must be an integer number from 1 to 100. Negative values as
		 * well as values above 100 are not allowed. The value can be overwritten
		 * per request if the "l_size" parameter is part of the URL.
		 *
		 * @param integer Number of products
		 * @since 2014.09
		 * @category User
		 * @category Developer
		 * @see client/html/catalog/lists/size
		 */
		$defaultSize = $this->getContext()->getConfig()->get( 'client/html/account/favorite/size', 48 );

		$size = (int) $view->param( 'fav-size', $defaultSize );
		return ( $size < 1 || $size > 100 ? $defaultSize : $size );
	}
408956
protected function addCache( \Aimeos\MShop\Context\Item\Iface $context )
	{
		$cache = new \Aimeos\MAdmin\Cache\Proxy\Standard( $context );

		return $context->setCache( $cache );
	}
813526
public function settingsAction(Request $request, View $view)
    {
        $pageSeo = $view->getSeo() ?: new PageSeo();
        $form = $this->createSettingsForm($pageSeo, $view);

        $form->handleRequest($request);

        $response = $this->getNotPersistedSettingsResponse(
            $form,
            $view,
            $request->query->get('novalidate', false)
        );

        return new JsonResponse($response);
    }
165290
public function compose(View $view)
    {
        $corporation_info = CorporationInfo::find($this->request->corporation_id);

        if (! is_null($corporation_info))
            $view->with('corporation_name', $corporation_info->name);
    }
436282
protected function getAllowedResources( \Aimeos\MW\View\Iface $view, array $resources )
	{
		$config = $this->getContext()->getConfig();
		$allowed = [];

		foreach( $resources as $resource )
		{
			if( $view->access( $config->get( 'admin/jsonadm/resource/' . $resource . '/groups', [] ) ) === true ) {
				$allowed[] = $resource;
			}
		}

		return $allowed;
	}