@param BlockView $view

@return string
502311
protected function getTranslationDomain(BlockView $view)
    {
        $translationDomain = $view->vars['translation_domain'];
        if (!$translationDomain && $view->parent) {
            $translationDomain = $view->parent->vars['translation_domain'];
        }
        if (!$translationDomain) {
            $translationDomain = 'messages';
        }

        return $translationDomain;
    }
768329
protected function buildBlockView($id, BlockView $parentView = null)
    {
        $blockType       = $this->rawLayout->getProperty($id, RawLayout::BLOCK_TYPE, true);
        $resolvedOptions = $this->rawLayout->getProperty($id, RawLayout::RESOLVED_OPTIONS, true);
        $types           = $this->typeHelper->getTypes($blockType);
        $view            = new BlockView($parentView);

        if (is_null($resolvedOptions)) { // Try to resolve options again to render block
            $options  = $this->rawLayout->getProperty($id, RawLayout::OPTIONS, true);
            $resolvedOptions = $this->setBlockResolvedOptions($id, $blockType, $options, $types);
        }

        // point the block view state to the current block
        $this->block->initialize($id);
        // build the view
        foreach ($types as $type) {
            $type->buildView($view, $this->block, $resolvedOptions);
            $this->registry->buildView($type->getName(), $view, $this->block, $resolvedOptions);
        }

        array_walk_recursive(
            $view->vars,
            function (&$var) {
                if ($var instanceof Options) {
                    $var = $var->toArray();
                }
            }
        );

        return $view;
    }
17480
public static function createFormView(BlockView $view, BlockInterface $block)
    {
        $parentForm = static::getParentFormView($view);

        if (null !== $parentForm) {
            $formPath = $block->hasOption('form_path') && null !== $block->getOption('form_path')
                ? $block->getOption('form_path')
                : $block->getName();
            $formNames = explode('.', $formPath);
            $form = $parentForm->vars['form'];

            foreach ($formNames as $formName) {
                if (isset($form->children[$formName])) {
                    $form = $form->children[$formName];
                }
            }

            if ($form !== $parentForm->vars['form']) {
                return $form;
            }
        }

        return $block->getForm()->createView($parentForm);
    }
937943
protected function logView($view)
    {
        $name = $view->getName();
        $data = $this->limitCollection(Arr::except($view->getData(), ['__env', 'app']));
        $path = static::editorLink($view->getPath());
        preg_match('/href=\"(.+)\"/', $path, $m);
        $path = (count($m) > 1) ? '(<a href="'.$m[1].'">source</a>)' : '';
        $this->views[] = compact('name', 'data', 'path');
    }
418122
private function getDataFromView(View $view)
    {
        $form = $this->getFormFromView($view);

        if (false === $form) {
            return $view->getData();
        }

        return $form;
    }
586561
public function getCacheKeyForView($view, $key = null)
    {
        $parts = [$this->cacheKey, $view];

        if ($key !== null) {
            $parts[] = $key;
        }

        return implode('.', $parts);
    }
635180
protected function createBlockView(FormView $view)
    {
        $bView = new BlockView();
        $bView->vars = $view->vars;
        $bView->vars['block'] = $bView;
        unset($bView->vars['form']);

        return $bView;
    }
414525
protected function getViewPath(string $view): string
    {
        if (DS != '/') {
            $view = str_replace('/', DS, $view);
        }

        $pos = strpos($view, ':');
        if ($pos === false) {
            return $this->viewPath . $view . '.phtml';
        } else {
            return dirname(substr($this->viewPath, 0, -1)) . DS . 'modules' . DS . substr($view, 0, $pos) . DS . 'views' . DS . substr($view, $pos + 1) . '.phtml';
        }
    }
950776
protected function insertBaseTag($view)
    {
        if (is_null($this->baseUrl)) {
            return $view;
        }

        return str_replace('<head>', '<head><base href="'.$this->baseUrl.'">', $view);
    }
889692
public function settings(View $view)
    {
        $handler = $this->get('handler');
        if (class_exists($handler)) {
            $handler = new $handler();

            return $handler->settings($this, $view);
        }

        return '';
    }
417134
private function getResponse(View $view)
    {
        return $this->templateEngine->renderResponse($this->template, $view->getParams());
    }
450715
private function recursiveBuildFinalBlockTree(BlockInterface $block = null, BlockView $view, &$output = null)
    {
        $viewHash = spl_object_hash($view);
        $blockHash = null;

        if (null !== $block) {
            $blockHash = spl_object_hash($block);
        } elseif (isset($this->blocksByView[$viewHash])) {
            $blockHash = $this->blocksByView[$viewHash];
        }

        $output = isset($this->dataByView[$viewHash])
            ? $this->dataByView[$viewHash]
            : [];

        if (null !== $blockHash) {
            $output = array_replace(
                $output,
                isset($this->dataByBlock[$blockHash])
                    ? $this->dataByBlock[$blockHash]
                    : []
            );
        }

        $this->validateViewIds($block, $view);

        $output['children'] = [];

        foreach ($view->children as $name => $childView) {
            // The CSRF token, for example, is never added to the block tree.
            // It is only present in the view.
            $childBlock = null !== $block && $block->has($name)
                ? $block->get($name)
                : null;

            $childHash = spl_object_hash($childView);
            $output['children'][$childHash] = [];

            $this->recursiveBuildFinalBlockTree($childBlock, $childView, $output['children'][$childHash]);
        }
    }
521505
protected function makeView($view)
    {
        if( Auth::check() ) {
            $this->addParameter( 'activeUser', Auth::user() );
        }

        return View::make( $view, $this->parameters );
    }
72336
public function render(TemplateView $view)
    {
        $content = $this->twig->render($view->getTemplate(), $view->getContext()->toArray());

        $response = new TemplateResponse($view->getTemplate(), $view->getContext(), $content);

        return $response;
    }
721452
public function getView()
    {
        if ($this->_view === null) {
            $this->_view = Yii::createObject(PhpBlockView::class);
        }
        
        return $this->_view;
    }
479435
public function generateViewFile($blockClassName)
    {
        sort($this->viewFileDoc);
        return $this->view->render('@cms/views/commands/block/create_block_view.php', [
            'blockClassName' => $blockClassName,
            'phpdoc' => $this->viewFileDoc,
            'luyaText' => $this->getGeneratorText('block/create'),
        ]);
    }
915890
public function getView($view)
    {
        if (Template::exists('Form/' . $view)) {
            return Template::getAdminTemplate('Form/' . $view);
        }

        return new View($view, B8_PATH . 'Form/View/');
    }