Configure common view properties

@param View $view
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');
    }
1347516
public function compose(View $view)
    {
        $countries = Country::all();
        $options = Collection::make();
        foreach ($countries as $country) {
            $options->put($country->currency_code,['id' => $country->currency_code,'name' => $country->currency_code] );
        }
        $statusOptions = Collection::make([['id' => 'ENABLED','name' => 'Enabled'],['id' => 'DISABLED','name' => 'Disabled']]);
       
        $view->with('codeOptions', $options)
                    ->with('statusOptions',$statusOptions);
    }
48695
public function set_view($view, $listorphan = true) {
        $this->view = $view;
        $this->listorphan = $listorphan;
    }
1262466
public function composeIndex(View $view)
    {
        $this->composeWithTitle($view);
        $this->composeWithLayout($view);
        $this->composeWithAllRouteNames($view);
        $this->composeWithRequiredFields($view);
        $this->composeWithValidationRules($view);
        $this->composeWithPartialsLocation($view);
        $this->composeWithResourceLocation($view);
    }
1291713
protected function setLayoutVariables(View &$layout)
    {
        $groups = array();
        $groupStore = b8\Store\Factory::getStore('ProjectGroup');
        $groupList = $groupStore->getWhere(array(), 100, 0, array(), array('title' => 'ASC'));

        foreach ($groupList['items'] as $group) {
            $thisGroup = array('title' => $group->getTitle());
            $projects = b8\Store\Factory::getStore('Project')->getByGroupId($group->getId());
            $thisGroup['projects'] = $projects['items'];
            $groups[] = $thisGroup;
        }

        $layout->groups = $groups;
    }
195955
public function compose(View $view)
    {
        $status = $this->system->getStatus();

        $view->withSystemStatus(Arr::get($status, 'system_status'));
        $view->withSystemMessage(Arr::get($status, 'system_message'));
    }
368177
public function compose(View $view)
    {

        $view->with('esi_status', EsiStatus::latest()->first());
        $view->with('is_rate_limited', $this->isEsiRateLimited());
        $view->with('rate_limit_ttl', $this->getRateLimitKeyTtl());
    }
789246
public function setView( MW_View_Interface $view )
	{
		$this->_view = $view;
		$this->_client->setView( $view );
	}
1350950
public function addView(View $view)
    {
        if ($this->hasView($view->getName())) {
            throw SchemaException::schemaViewAlreadyExists($this->getName(), $view->getName());
        }

        $this->views[$view->getName()] = $view;
    }
841669
public function compose(View $view)
    {
        $user = Container::getInstance()->make(AuthFactory::class)->user();

        if ($user) {
            $view->with([
                'user', $user,
            ]);
        }
    }
740310
public function setView($view, array $data = [])
    {
        $this->view = $view;

        $this->data = $data;

        return $this;
    }
485207
public function createView(View $view)
    {
        $this->_execSql($this->_platform->getCreateViewSQL($view->getQuotedName($this->_platform), $view->getSql()));
    }
202084
protected function initializeView(ViewInterface $view)
    {
        $view->assign('contentObjectData', $this->configurationManager->getContentObject()->data);
        parent::initializeView($view);
    }
1084897
public function compose(View $view)
    {
        if ($this->overwriteDisabled($view)) {
            return $view;
        }

        $this->currentPath = collect(explode('/views/', $view->getPath()))->last();

        if (\View::exists($this->getNewView())) {
            $view->setPath($this->getNewPath());
        }

        return $view;
    }
249434
public function updateViewCss(View $view)
    {
        $view->changeCssHash();

        //Update css file
        $this->widgetMapBuilder->build($view, true);
        $widgets = $this->widgetRepo->findAllWidgetsForView($view);

        //Generate CSS file and set View's CSS as up to date
        $oldHash = $view->getCssHash();
        $view->changeCssHash();
        $this->viewCssBuilder->updateViewCss($oldHash, $view, $widgets);
        $view->setCssUpToDate(true);

        //Persist new hash and upToDate bool
        $metadata = $this->em->getClassMetadata(get_class($view));
        $this->uow->recomputeSingleEntityChangeSet($metadata, $view);
    }
223351
public function compose(View $view)
    {
        if (Session::has('multi_language_enabled')) {
            $languages = Session::get('languages');
            $defaultLanguage = Session::get('default_language');
            $langId = request()->get('language_id', $defaultLanguage->id);
            $isDefaultLang = ($defaultLanguage->id == $langId) ? true : false;
        }
        $view->withDefaultLanguage($defaultLanguage)
            ->withLanguages($languages)
            ->withIsDefaultLang($isDefaultLang);
    }
222630
public function compose(View $view)
    {
        $termConditionPageUrl = '#';

        $user = Auth::user();

        $pageId = Configuration::getConfiguration('general_term_condition_page');

        if (null !== $pageId) {
            $page = Page::find($pageId);
            $termConditionPageUrl = route('page.show', $page->slug);
        }

        $cartProducts = Session::get('cart');
        $view->with('cartProducts', $cartProducts)
            ->with('user', $user)
            ->with('termConditionPageUrl', $termConditionPageUrl);
    }