Returns the view for current request

@return View
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;
    }
1293001
public function view () {
		$view_method_name = Strings::ToLowerCamelCase($this->action.'_view');
		return (method_exists($this, $view_method_name)) ? $this->$view_method_name() : $this->render;
	}
218792
public function getCurrent()
    {
        if (is_null($this->current))
        {
            $siteView = $this->makeNewViewModel();

            $this->current = $siteView;
        }

        return $this->current;
    }
287044
protected function _getView() {
		$helpers = (array)Configure::read('Maintenance.helpers');

		$View = new View(null);
		$View->viewVars = (array)Configure::read('Maintenance.viewVars');
		$View->helpers = $helpers;
		$View->loadHelpers();
		$View->hasRendered = false;
		$View->viewPath = 'Maintenance';
		return $View;
  }
721452
public function getView()
    {
        if ($this->_view === null) {
            $this->_view = Yii::createObject(PhpBlockView::class);
        }
        
        return $this->_view;
    }
269451
protected function getView()
    {
        if (!$this->view) {
            $config = isset($this->options[self::OPTION_VIEW]) ? $this->options[self::OPTION_VIEW] : [];
            $config = $this->configToArray($config, true);

            $view = $this->createMvcView($config);

            if ($view instanceof IModelAware) {
                $view->setModelFactory($this->getModelsFactory());
            }

            return $this->view = $view;
        }

        return $this->view;
    }
915890
public function getView($view)
    {
        if (Template::exists('Form/' . $view)) {
            return Template::getAdminTemplate('Form/' . $view);
        }

        return new View($view, B8_PATH . 'Form/View/');
    }
342654
public function indexAction()
    {
        $visibilityService = $this->getVisibilityService();
        $options = $visibilityService->getOptions();

        $widgetId = $options->getWidgetId();
        if (! $widgetId) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The widget identifier was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/layout')
                ->setStatusCode(303);
        }

        $widget = $this->deriveWidget($widgetId);
        if (empty($widget)) {
            return $this->getResponse();
        }
        if ($this->getRequest()->isPost()) {
            $event = $this->request->getPost('suboperation');
            if (! empty($event)) {
                $events = $this->getEventManager();
                $params = $this->getRequest()->getPost();
                $params['widget_id'] = $widget->getId();
                $result = $events->trigger($event, $this, $params);
                if ($result->last() instanceof Response) {
                    return $result->last();
                }
            }
        }

        $view = new ViewModel;
        $view->options = $options;
        $view->widget = $widget;

        $moduleOptions = $this->getModuleOptions();
        $view->config = $moduleOptions->getWidgetByName($widget->getName());

        $view->list = $visibilityService->getContentList();
        $visibilityService->saveOptions();

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

            //Create the view
            $config = array(
                'media_url' => AnRequest::root().'/media',
                'base_url' => AnRequest::url()->getUrl(AnHttpUrl::BASE),
                'state' => $this->getState(),
            );

            if ($this->_request->has('layout')) {
                $config['layout'] = $this->_request->get('layout');
            }

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

        return $this->_view;
    }
52606
public static function current()
    {
        if (!is_null(static::$uri)) {
            return static::$uri;
        }

        //Format a given URI.
        $uri = trim(self::$pathInfo, '/') ?: '/';

        //Set the URI segments for the request.
        $segments = explode('/', trim($uri, '/'));
        static::$segments = array_diff($segments, array(''));

        return static::$uri = $uri;
    }
584710
public function showAction()
    {
        $id = (int) $this->params()->fromRoute('id', null);

        $service = $this->getService();
        $entity  = $service->getById($id);

        $view = new ViewModel(array(
            'entity'  => $entity,
            'options' => $this->getOptions(),
        ));

        if ($this->getOptions()->getDisplayDiagrammInDetailView()) {
            $diagramm = $this->getService()->createUseCaseDiagrammFor($entity);
            $view->setVariable('diagramm', $diagramm);
        }

        return $view;
    }
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;
    }
959838
private function getCurrentRequestContent()
    {
        $currentRequest = $this->requestStack->getCurrentRequest();
        if (!is_null($currentRequest)) {
            $this->currentRequestContent = json_decode($currentRequest->getContent());
        }
        return $this->currentRequestContent;
    }
1090496
public function current()
    {
        return call_user_func(
            $this->fetchCallback,
            pg_fetch_array( $this->resource, $this->fetchRowNumber, $this->fetchType )
        );
    }
213015
public function getView(): ViewInterface
    {
        if (null === $this->view) {
            $this->setView(
                $this->getDefaultView()
            );
        }

        return $this->view;
    }
1204123
protected function formView()
    {
        // get form view
        $formView = $this->RequestContext->getControls()->getControl('action_form_view');

        if($formView == null || empty($formView)) {
            $formView = $this->RequestContext->getControls()->getControl('view');
        }

        return $formView;
    }
4665
public function viewWithPayload()
    {
        return function (string $view, PayloadContract $payload, string $key = 'payload') {
            return ResponseFactory::view($view, [$key => $payload->getUnwrappedOutput()], $payload->getStatus());
        };
    }