Sets the view for this controller action

@param $view
@return $this|bool
326850
public function setView($view)
    {

        if (class_exists($view)) {
            //if we already have a default view
            $values = [];

            //grab all its parameters and store in parameters
            if (isset($this->view) && $this->view instanceof View) {

                $values = $this->view->getDataArray();
                $layout = $this->view->getLayout();

                //Load the newView;
                $this->view = $this->loadView($view, $values);

                if (!empty($layout)) {
                    $this->view->setLayout($layout);
                }
            }

            return $this;

        } else if (is_string($view)) {

            $this->response->addContent($view); //so that $this->view("Hi There");  will output Hi There;

            return $this;

        }

        return false; //no view set;
    }
1013510
public static function setView($view)
    {
        if (count(self::$execContexts)) {
            self::$execContexts[count(self::$execContexts) - 1]['view'] = $view;
        }
    }
237675
public function setViewParams($view)
    {
        
        foreach ($this->url as $url) {
            if(isset($view->params['urls']) && is_array($view->params['urls'])){
                $view->params['urls'] = $this->MenuMerge($view->params['urls'],$url);
            }else{
                $view->params['urls'] = $url;
            }
            
        }
        
        if($module = $this->getModule()){
            $view->params['urls'][$module]['active']=true;
        }
    }
1204205
public function setViewController($controller)
    {
        if (is_scalar($controller) || is_resource($controller)) {
            throw new InvalidArgumentException(
                'View controller must be an object, null or an array'
            );
        }

        $this->viewController = $controller;

        return $this;
    }
934196
public function setTemplate($template)
    {
        $layout = $this->getViewModel();
        $layout->setTemplate((string) $template);

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

        return new View($view, B8_PATH . 'Form/View/');
    }
371643
protected function setRawBody($view)
    {
        $this->message->builder()->setHtmlBody($view);
        $this->message->builder()->setTextBody(strip_tags($view, '<a>'));
    }
1350950
public function addView(View $view)
    {
        if ($this->hasView($view->getName())) {
            throw SchemaException::schemaViewAlreadyExists($this->getName(), $view->getName());
        }

        $this->views[$view->getName()] = $view;
    }
109680
public function view($view = null)
    {
        if (empty($view)) {
            return $this->getConfig('view') ?: $this->_request()->getParam('action');
        }

        return $this->setConfig('view', $view);
    }
616031
public function make( $view, $data = [] ) {
		return new View( $this, $this->engine, $this->view( $view ), $this->create_data( $data ) );
	}
37997
protected function set_view()
	{
		$this->_view instanceOf View or $this->_view = \View::forge($this->_view);
	}
139137
protected function setTwigTemplateInstance($view)
    {
        if (!$this->has('twig_template')) {
            $this->set('twig_template', static::$twigEnvironment->loadTemplate(
                str_replace('.', DS, $view).$this->getTemplateExtension()
            ));
        }

        return $this;
    }
834802
public function setView(\Zend_View_Interface $view = null) {
        if (null !== $view) {
            if (false === $view->getPluginLoader('helper')->getPaths('CKEditor_View_Helper')) {
                $view->addHelperPath('CKEditor/View/Helper', 'CKEditor_View_Helper');
            }
        }

        if (!file_exists($this->basePath . '/ckeditor.js')) {
            throw new \Zend_Exception('Use setBasePath() to set the full path to the file ckeditor.php in the public folder of ckedit.');
        }

        return parent::setView($view);
    }
785010
public function setLayout($layout){
        $this->_layout = $layout;
        if(isset($this->_view[0])) {
            $this->resetViews();
        }
        $this->addView($layout);
    }
700958
public function disableView(bool $disable = true)
    {
        if ($disable) {
            array_delete($this->actions, 'view');
        } elseif (!in_array('view', $this->actions)) {
            array_push($this->actions, 'view');
        }

        return $this;
    }
879122
public function drop($view) 
    {
        if ($view instanceof View) {
            $view = $view->getName();
        }

        $url = UrlHelper::buildUrl(Urls::URL_VIEW, [$view]);
        $this->getConnection()->delete($url);

        return true;
    }
1091541
protected function setView($action)
    {
        if (View::exists($this->className . '/' . $action)) {
            $this->view = new View($this->className . '/' . $action);
        }
    }