Registers the CSS and JS files with the given view.
@param \yii\web\View $view the view that the asset files are to be registered with.
199554
public function registerAssetFiles($view)
    {
        if (is_array(self::$_assets)) {
            $this->css = array_values(array_intersect_key(self::$_css, self::$_assets));
            $this->js = array_values(array_intersect_key(self::$_js, self::$_assets));
        }
        array_unshift($this->css, self::$_css['lib']);
        array_unshift($this->js, self::$_js['lib']);
        parent::registerAssetFiles($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);
    }
927144
public function compose(View $view)
    {
        $componentGroups = $this->getVisibleGroupedComponents();
        $ungroupedComponents = Component::ungrouped()->orderBy('status', 'desc')->get();

        $view->withComponentGroups($componentGroups)
            ->withUngroupedComponents($ungroupedComponents);
    }
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;
    }
1349487
public function registerAssetFiles($view)
    {
        if ($this->language !== null) {
            $this->js[] = 'langs/' . $this->language . '.min.js';
        }

        if (!empty($this->plugins)) {
            foreach ($this->plugins as $plugin => $properties) {
                if (is_string($properties)) {
                    $plugin = $properties;
                }

                if ($plugin === 'colors') {
                    $this->css[] = 'plugins/' . $plugin . '/ui/trumbowyg.' . $plugin . '.css';
                }

                $this->js[] = 'plugins/' . $plugin . '/trumbowyg.' . $plugin . '.js';
            }
        }

        parent::registerAssetFiles($view);
    }
262011
public function compose(View $view)
    {
        $view->withCacheDrivers($this->cacheDrivers);
        $view->withMailDrivers($this->mailDrivers);
        $view->withQueueDrivers($this->queueDrivers);
    }
296881
public function setTemplateInheritorsCssToUpdate(View $view)
    {
        if (!($view instanceof Template)) {
            return;
        }
        foreach ($view->getInheritors() as $inheritor) {
            $inheritor->setCssUpToDate(false);
            $this->uow->persist($inheritor);
            $this->setTemplateInheritorsCssToUpdate($inheritor);
        }
    }
570416
private function load($view) {

		$data = $this->data($view);

		if(file_exists($data['file'])) {

			extract($data['var']);

			require $data['file'];
		}
	}
7330
public function setView($view, $variables = [])
    {
        if (!empty($variables)) {
            $this->with($variables);
        }

        $this->view = $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);
    }
528432
protected function render($view,$data)
	{
		$data['version']=$this->getVersionInfo();
		$data['time']=time();
		$data['admin']=$this->adminInfo;
		include($this->getViewFile($view,$data['code']));
	}
1323355
public function registerAssets()
    {
        $view = $this->getView();
        /** @var yii\web\AssetBundle $bandle */
        $bandle = Select2Asset::register($view);
        if ($this->language !== false) {
            $langs[0] = $this->language ? $this->language : Yii::$app->language;
            if (($pos = strpos($langs[0], '-')) > 0) {
                // If "en-us" is not found, try to use "en".
                $langs[1] = substr($langs[0], 0, $pos);
            }
            foreach ($langs as $lang) {
                $langFile = "/js/i18n/{$lang}.js";
                if (file_exists($bandle->sourcePath . $langFile)) {
                    $view->registerJsFile($bandle->baseUrl . $langFile, ['depends' => Select2Asset::className()]);
                    break;
                }
            }
        }
        if ($this->bootstrap) {
            Select2BootstrapAsset::register($view);
        }
        $settings = Json::encode($this->settings);
        $js = "jQuery('#{$this->options['id']}').select2($settings)";
        if ($this->maximize) {
            Select2MaximizeAsset::register($view);
            if (is_integer($this->maximize)) {
                $this->maximize = "{cushion: $this->maximize}";
            } elseif (is_array($this->maximize)) {
                $this->maximize = Json::encode($this->maximize);
            } else {
                $this->maximize = '{}';
            }
            $js .= ".maximizeSelect2Height($this->maximize)";
        }
        foreach ($this->events as $event => $handler) {
            $js .= '.on("' . $event . '", ' . new JsExpression($handler) . ')';
        }
        $view->registerJs("$js;");
    }
872646
protected function registerScripts(\yii\web\View $view){
        if ($this->clientOptions !== false) {
            $options = empty($this->clientOptions) ? '' : Json::encode($this->clientOptions);
            $js = "jQuery('#{$this->id}').fancybox($options);";
            $view->registerJs($js , View::POS_READY);
        }
    }
518594
public function compose(View $view)
    {
        $categoryOptions = $this->repository->options();
        $view->with('categoryOptions', $categoryOptions);
    }
87335
public function composeWithRequiredFields(View $view)
    {
        $requiredFields = array_keys($this->getRequiredFields());

        $view->with('requiredFields', $requiredFields);
    }
851953
public function initializeView(ViewInterface $view)
    {
        $sitePackageKey = $this->getDefaultSitePackageKey();
        $this->view->assign('defaultSitePackageKey', $sitePackageKey);
    }
516848
protected function registerViews()
    {
        // register views within the application with the set namespace
        $this->loadViewsFrom($this->packagePath('resources/views'), 'votee');
        // allow views to be published to the storage directory
        $this->publishes([
            $this->packagePath('resources/views') => base_path('resources/views/vendor/votee'),
        ], 'views');
    }