Return view

@param string $view
@param mixed array
@return void
764597
public static function view(string $view, array $data = [])
  {
    $global = Self::$variables::get();
    $data = array_merge($global, $data);

    return Self::$view->view($view, $data);
  }
49010
protected function initViewContentBlocks($view)
    {
        $view->setBlock(
            'content',
            $this->getRequest()->getControllerName() . '/' . $this->getRequest()->getActionName()
        );

        return $view;
    }
417134
private function getResponse(View $view)
    {
        return $this->templateEngine->renderResponse($this->template, $view->getParams());
    }
732940
public function view(string $view, array $data = []) : Mail
  {
    $this->viewLocation = $view;
    $this->viewArgs = $data;
    return $this;
  }
728018
public function create(string $view, array $variables = []): View
	{
		[$path, $extension] = $this->getViewPathAndExtension($view);

		return new View($path, $this->mergeVariables($view, $variables), $this->resolveRenderer($extension));
	}
765381
protected function _getFormView($view = null)
    {
        if (empty($view) && Arr::in($this->request->getParam('action'), $this->_formActions)) {
            $view = $this->_findViewByRequest();
        }

        return $view;
    }
28473
public function make($view, array $data = [])
    {
        $location = $this->finder->find($view);

        if ( ! $location) {
            throw new \Exception(sprintf('View `%s` cannot be found!', $view));
        }

        return new View($location, $view, $data);
    }
428285
public function view($view, $data = array(), $mergeData = array())
    {
        return $this->views->make($this->getThemeNamespace($view), $data, $mergeData);
    }
906605
public function view($view = null, $layout = null)
    {
        $layoutOptions = $this->getLayoutOptions($layout);

        // Set up the default view resolution
        viewResolver()->setUp($layoutOptions, $view);
        $this->setupLayout();
    }
406505
public function render($view, array $data = null)
	{
		$engine = new Engine($this->templatePath);
		$template = new Template($engine);
		return $template->render($view, $data);
	}
162732
private function view(View $view): void
    {
        $this->group($view->getName(), false);
        $this->presentationModel($view->getPresentationModel(), 'presentationModel');
        $this->groupEnd();
    }
532377
protected function parseView($view)
    {
        if (is_string($view)) {
            return array($view, null, null);
        }

        // If the given view is an array with numeric keys, we will just assume that
        // both a "pretty" and "plain" view were provided, so we will return this
        // array as is, since must should contain both views with numeric keys.
        if (is_array($view) && isset($view[0])) {
            return array($view[0], $view[1], null);
        }

        // If the view is an array, but doesn't contain numeric keys, we will assume
        // the the views are being explicitly specified and will extract them via
        // named keys instead, allowing the developers to use one or the other.
        else if (is_array($view)) {
            return array(
                Arr::get($view, 'html'),
                Arr::get($view, 'text'),
                Arr::get($view, 'raw'),
            );
        }

        throw new \InvalidArgumentException("Invalid view.");
    }
1137141
public static function get($view, $data = array()){

        if( $data ){
            self::$level = self::$level + 1;
            self::$data[ self::$level ] = (array) $data;
        }

        $file = SRC. "{$view}.php";

        // Parse view
        ob_start();

            self::process($file);

            if( $data ){

                unset(self::$data[ self::$level ]);
                self::$level = self::$level - 1;
                self::process(NULL);

            }

            $view = ob_get_contents();

        ob_end_clean();

        return $view;
    }
1373604
public function view($view, $data = [], $mergeData = [])
    {
        return $this->app['view']->make($this->viewname($view), $data, $mergeData);
    }
683878
public function fetch($view, array $data = [])
    {
        $file = $this->getViewFile($view);

        if (!is_file($file)) {
            throw new \RuntimeException("cannot render '$view' because the view file does not exist. File: $file");
        }

        /*
        foreach ($data as $k=>$val) {
            if (in_array($k, array_keys($this->attributes))) {
                throw new \InvalidArgumentException("Duplicate key found in data and renderer attributes. " . $k);
            }
        }
        */
        $data = array_merge($this->attributes, $data);

        try {
            ob_start();
            $this->protectedIncludeScope($file, $data);
            $output = ob_get_clean();
        } catch (\Throwable $e) { // PHP 7+
            ob_end_clean();
            throw $e;
        }

        return $output;
    }
7330
public function setView($view, $variables = [])
    {
        if (!empty($variables)) {
            $this->with($variables);
        }

        $this->view = $view;
    }
291133
public function setView($view)
    {
        if(!($view instanceof KViewInterface))
        {
            if(is_string($view) && strpos($view, '.') === false )
            {
                $identifier			= $this->getIdentifier()->toArray();
                $identifier['path']	= array('view', $view);
                $identifier['name']	= $this->getRequest()->getFormat();

                $identifier = $this->getIdentifier($identifier);
            }
            else $identifier = $this->getIdentifier($view);

            $view = $identifier;
        }

        $this->_view = $view;

        return $this->_view;
    }