Get the view object attached to the template.

@return LibBaseViewAbstract
191269
public function getView()
    {
        if (!$this->_view instanceof LibBaseViewAbstract) {
            //Make sure we have a view identifier
            if (!($this->_view instanceof AnServiceIdentifier)) {
                $this->setView($this->_view);
            }

            $this->_view = $this->getService($this->_view);
        }

        return $this->_view;
    }
336023
private function getPreviewObject()
    {
        $category = $this->getCategory();
        $pageSize = $this->getPageSize();
        $search = $this->getRequest()->getParam('search');

        return $this->previewModelFactory->create(['category' => $category, 'size' => $pageSize, 'search' => $search]);
    }
78618
public function getViewPath()
    {
        if ($this->_viewPath === null) {
            $ref = new ReflectionClass($this);
            $this->_viewPath = dirname(dirname($ref->getFileName())) . '/views/menus';
        }
        return $this->_viewPath;
    }
999545
public function getToolbar()
    {
        $view = $this->_template->getView();
        $toolbar = $view->getState()->toolbar;
        if (!$toolbar) {
            $controller = $this->getController($view->getName());
            $toolbar = $controller->getIdentifier()->name;
            if ($controller->hasToolbar($toolbar)) {
                $toolbar = $controller->getToolbar($toolbar);
            }
            $controller->toolbar = $toolbar;
        }

        return $view->getState()->toolbar;
    }
593168
public function getViewPath()
    {
        // Cache mechanism
        if (self::$_viewPath) {
            return self::$_viewPath;
        }
        
        // Called widget filepath
        $reflectionClass = new ReflectionClass($this);
        $widgetPath = dirname($reflectionClass->getFileName());
        // For Codeigniter view which doesn't support absolute path
        $relativePath = str_replace(APPPATH, '', $widgetPath);

        // Real relative view path for Codeigniter
        return self::$_viewPath = "../{$relativePath}/views/";
    }
1283003
public function getViewBox()
    {
        $attr = $this->getAttribute('viewBox');
        if (empty($attr)) {
            return null;
        }

        $result = preg_split('/[\s,]+/', $attr);
        if (count($result) !== 4) {
            return null;
        }

        return array_map('floatval', $result);
    }
636706
private function view()
    {
        if (isset(static::$view)) {
            return static::$view;
        }

        $classNamespace = $this->getModuleName();
        $className = $this->getComponentName();

        return "{$classNamespace}::blocks.{$className}";
    }
913625
private function getPreviewObject()
    {
        $optimizer       = $this->getOptimizer();
        $pageSize        = $this->getPageSize();
        $queryText       = $this->getQueryText();
        $category        = $this->getCategory();
        $containerConfig = $this->getContainerConfiguration();

        return $this->previewModelFactory->create(
            [
                'optimizer'       => $optimizer,
                'containerConfig' => $containerConfig,
                'category'        => $category,
                'queryText'       => $queryText,
                'size'            => $pageSize,
            ]
        );
    }
1133686
public function getViewPath()
    {
        return is_null($this->_nsedModuleViewPath) ?
        parent::getViewPath()
        . DIRECTORY_SEPARATOR
        . array_pop(explode('\\', $this->controllerNamespace)) :
        parent::getViewPath();
    }
196019
public function getView()
    {
        if (is_null($this->_view)) {
            $controller = $this->_routeInfo->controllerName;
            $name = $this->_routeInfo->action;
            $ext = $this->_routeInfo->getExtension();
            $template = "{$controller}/{$name}.{$ext}.twig";
            if (!is_null($this->_controller->view)) {
                $template = "{$this->_controller->view}.{$ext}.twig";
            }
            $this->_view = new View(['file' => $template]);
        }
        return $this->_view;
    }
1044725
public function getSilverStripeNavigator()
    {
        $page = $this->currentPage();
        if ($page instanceof CMSPreviewable) {
            $navigator = new SilverStripeNavigator($page);
            return $navigator->renderWith($this->getTemplatesWithSuffix('_SilverStripeNavigator'));
        }
        return null;
    }
92014
public function getView()
    {
        if (!isset($this->view) || !($this->view instanceof \Osf\View\OsfView)) {
            throw new ArchException('This trait must be used in a view context');
        }
        return $this->view;
    }
425314
protected function getViewPath()
    {
        if (is_null($this->viewPath) === false) {
            return $this->viewPath;
        }

        return $this->viewPath = __DIR__.'/../../resources/views/'.ucfirst(class_basename(get_class($this))).'/';
    }
722243
private function getTemplate()
    {
        $template = config('laranotify.template');
        if ($template == '' && $this->template == '') {
            return $this->defaultTemplate();
        }

        if ($this->template != '') {
            return ($this->template);
        }

        return view($template);
    }
361184
public function getView()
	{
	    if (!$this->has('view')) {
	        // first load current module, then overwrite common view config.
	        $configs = Config::get('views', $this->getName(), true);
	        
	        if ($configs) {
	            $client  = ClientType::detectClientType();
	            if ($client === ClientType::PC) {
	                $config = isset($configs['pc']) ? $configs['pc'] : [];
	            } else {
	                $config = isset($configs[$client]) ? $configs[$client] : (isset($configs['mobile']) ? $configs['mobile'] : (isset($configs['pc']) ? $configs['pc'] : []));
	            }
	        } else {
	            $config = Config::get('view', $this->getName(), true);
	        }
	        
	        if (!isset($config['templatePath'])) {
	            $config['templatePath'] = $this->basePath . 'view';
	        }
	        if (!isset($config['compiledPath'])) {
	            $config['compiledPath'] = rtrim(Config::getStoragePath(), '/') . '/app/' . $this->getName() . '/view';
	            $config['compiledPath'] = str_replace('//', '/', $config['compiledPath']);
	        }
	        if (!isset($config['htmlPath'])) {
	            $config['htmlPath'] = rtrim(Config::getWebRootPath(), '/') . '/html/' . $this->getName();
	            $config['htmlPath'] = str_replace('//', '/', $config['htmlPath']);
	        }
	        
	        $object = new View($config);
	        $this->set('view', $object);
	    }
	    
	    return $this->get('view');
	}
1349173
public function getTemplate()
    {
        if (is_null($this->_template)) {
            Template::appendPath(dirname(__FILE__).'/Views');
            $temp = new Template();
            $this->_template = $temp->initialize();
        }
        return $this->_template;
    }
814623
public function getView(): ?Factory
    {
        if (!$this->hasView()) {
            $this->setView($this->getDefaultView());
        }
        return $this->view;
    }