Adds the required data used in the attribute template

@param \Aimeos\MW\View\Iface $view View object
@return \Aimeos\MW\View\Iface View object with assigned parameters
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;
	}
1229902
public function & SetView (\MvcCore\IView & $view) {
		parent::SetView($view);

		if (self::$appRoot === NULL) self::$appRoot = $this->request->GetAppRoot();
		if (self::$basePath === NULL) self::$basePath = $this->request->GetBasePath();
		if (self::$scriptName === NULL) self::$scriptName = ltrim($this->request->GetScriptName(), '/.');
		$app = $view->GetController()->GetApplication();
		$configClass =$app->GetConfigClass();
		self::$loggingAndExceptions = $configClass::IsDevelopment(TRUE);
		$mvcCoreCompiledMode = $app->GetCompiled();

		self::$ctrlActionKey = $this->request->GetControllerName() . '/' . $this->request->GetActionName();

		// file checking is true only for classic development mode, not for single file mode
		if (!$mvcCoreCompiledMode) self::$fileChecking = TRUE;

		// file rendering is true for classic development state, SFU app mode
		if (!$mvcCoreCompiledMode || $mvcCoreCompiledMode == 'SFU') {
			self::$fileRendering = TRUE;
		}

		if (is_null(self::$assetsUrlCompletion)) {
			// set URL addresses completion to true by default for:
			// - all package modes outside PHP_STRICT_HDD and outside development
			if ($mvcCoreCompiledMode && $mvcCoreCompiledMode != 'PHP_STRICT_HDD') {
				self::$assetsUrlCompletion = TRUE;
			} else {
				self::$assetsUrlCompletion = FALSE;
			}
		}

		self::$systemConfigHash = md5(json_encode(self::$globalOptions));

		return $this;
	}
945293
protected function addAccess( \Aimeos\MW\View\Iface $view, \Aimeos\MShop\Context\Item\Iface $context )
	{
		if( $this->config->get( 'shop.accessControl', true ) === false
			|| ( ( $user = \Illuminate\Support\Facades\Auth::user() ) !== null && $user->superuser )
		) {
			$helper = new \Aimeos\MW\View\Helper\Access\All( $view );
		}
		else
		{
			$support = $this->support;

			$fcn = function() use ( $support, $context ) {
				return $support->getGroups( $context );
			};

			$helper = new \Aimeos\MW\View\Helper\Access\Standard( $view, $fcn );
		}

		$view->addHelper( 'access', $helper );

		return $view;
	}
625984
protected function render( \Aimeos\MW\View\Iface $view )
	{
		/** admin/jqadm/locale/site/template-item
		 * Relative path to the HTML body template for the locale item.
		 *
		 * The template file contains the HTML code and processing instructions
		 * to generate the result shown in the body of the frontend. The
		 * configuration string is the path to the template file relative
		 * to the templates directory (usually in admin/jqadm/templates).
		 *
		 * You can overwrite the template file configuration in extensions and
		 * provide alternative templates. These alternative templates should be
		 * named like the default one but with the string "default" replaced by
		 * an unique name. You may use the name of your project for this. If
		 * you've implemented an alternative client class as well, "default"
		 * should be replaced by the name of the new class.
		 *
		 * @param string Relative path to the template creating the HTML code
		 * @since 2017.10
		 * @category Developer
		 */
		$tplconf = 'admin/jqadm/locale/site/template-item';
		$default = 'locale/site/item-standard';

		return $view->render( $view->config( $tplconf, $default ) );
	}
891883
protected function render($view)
    {
        $view = $this->getViewPath().$view.'.php';
        if (empty($this->attributes) === true) {
            $this->template->setAttributes(
                $this->attributes = $this->getAttributes()
            );
        }

        return $this->template->render($view);
    }
700748
public function compose(View $view)
    {
        $strategy = $this->getValidatedStrategyFromConfig();
        $output = [];

        foreach((array)config("sharp.extensions.assets") as $position => $paths) {
            foreach((array)$paths as $assetPath) {
                if(!isset($output[$position])) {
                    $output[$position] = [];
                }

                // Only render valid assets
                if(ends_with($assetPath, $this->assetTypes)) {
                    // Grab the relevant template based on the filetype
                    $template = array_get($this->renderTemplates, $this->getAssetFileType($assetPath));

                    // Apply the strategy (run through asset() or mix()
                    $resolvedAssetPath = $this->getAssetPathWithStrategyApplied($strategy, $assetPath);

                    $output[$position][] = sprintf($template, $resolvedAssetPath);
                }
            }
        }

        // Build the strings to output in the blades
        $toBind = [];
        foreach((array)$output as $position => $toOutput) {
            $toBind[$position] = implode('', $toOutput);
        }

        $view->with('injectedAssets', $toBind);
    }
403899
protected function addViewData( \Aimeos\MW\View\Iface $view )
	{
		$context = $this->getContext();

		$priceTypeManager = \Aimeos\MShop::create( $context, 'price/type' );
		$listTypeManager = \Aimeos\MShop::create( $context, 'service/lists/type' );
		$currencyManager = \Aimeos\MShop::create( $context, 'locale/currency' );

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

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

		$view->priceTypes = $this->map( $priceTypeManager->searchItems( $search ) );
		$view->priceListTypes = $this->map( $listTypeManager->searchItems( $listSearch ) );
		$view->priceCurrencies = $currencyManager->searchItems( $currencyManager->createSearch( true )->setSlice( 0, 10000 ) );

		if( $view->priceCurrencies === [] ) {
			throw new \Aimeos\Admin\JQAdm\Exception( 'No currencies available. Please enable at least one currency' );
		}

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

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

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

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

			$basketCtrl->addAddress( $type, $params );
		}
		else if( ( $option = $view->param( 'ca_deliveryoption', 'null' ) ) !== '-1' ) // existing address
		{
			$params = $view->param( 'ca_delivery_' . $option, [] );

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

			$cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' );

			if( ( $address = $cntl->uses( ['customer/address'] )->get()->getAddressItem( $option ) ) !== null )
			{
				$cntl->addAddressItem( $address->fromArray( $params ), $option )->store();
				$params = $address->toArray();
			}

			$basketCtrl->addAddress( $type, $params );
		}
		else
		{
			$basketCtrl->deleteAddress( $type );
		}
	}
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;
    }
421564
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;
	}
1180003
final public function setView(View $view) {
        $this->view = $view;
        $this->publicAssetsPath = ROOT . 'public' . DIRECTORY_SEPARATOR . '.assets' . DIRECTORY_SEPARATOR;
        return $this;
    }
824153
public function create($view, $data = [])
    {
        $filename = $this->getFinder()->find($view);

        $mergeMethod = ($data instanceof Data) ? 'addAll' : 'merge';

        $this->getData()->$mergeMethod($data);

        return new View($filename, $this->getData(), new Context($this));
    }
25362
public function attachTrackerView($view)
    {
        if ( ! $this->trackerViews->contains($view->getKey()))
        {
            return $this->trackerViews()->attach($view);
        }
    }
818126
protected static function addParam( \Aimeos\MW\View\Iface $view, \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null )
	{
		if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param'] )
			&& is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param'] ) )
		) {
			return $fcn( $view, $request );
		}

		$params = ( $request !== null ? $request->getArguments() : array() );
		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $view, $params );
		$view->addHelper( 'param', $helper );

		return $view;
	}
326850
public function setView($view)
    {

        if (class_exists($view)) {
            //if we already have a default view
            $values = [];

            //grab all its parameters and store in parameters
            if (isset($this->view) && $this->view instanceof View) {

                $values = $this->view->getDataArray();
                $layout = $this->view->getLayout();

                //Load the newView;
                $this->view = $this->loadView($view, $values);

                if (!empty($layout)) {
                    $this->view->setLayout($layout);
                }
            }

            return $this;

        } else if (is_string($view)) {

            $this->response->addContent($view); //so that $this->view("Hi There");  will output Hi There;

            return $this;

        }

        return false; //no view set;
    }
965931
protected function configureView($view)
    {
        $this->setBasicVariablesNoneAdminView($view);

        $view->linkTitle = Piwik::getRandomTitle();

        // crsf token: don't trust the submitted value; generate/fetch it from session data
        $view->nonce = Nonce::getNonce('Login.login');
    }
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;
	}