Return / Render the view
@param       $view
@param array $data
@return $this
979764
protected function view($view, $data = [])
    {
        return parent::view($view, $data)
            ->with('settings', settings())
            ->with('banners', $this->getBanners())
            ->with('popularPages', $this->popularPages)
            ->with('showPageBanner', $this->showPageBanner)
            ->with('activePageTiers', $this->activePageTiers)
            ->with('footerNavigation', $this->footerNavigation)
            ->with('navigationFeatured', $this->navigationFeatured);
    }
764597
public static function view(string $view, array $data = [])
  {
    $global = Self::$variables::get();
    $data = array_merge($global, $data);

    return Self::$view->view($view, $data);
  }
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;
    }
741226
protected function view($view, $data = [], $auto_filter = null)
	{
		return $this->theme->view($view, $data, $auto_filter);
	}
428285
public function view($view, $data = array(), $mergeData = array())
    {
        return $this->views->make($this->getThemeNamespace($view), $data, $mergeData);
    }
585057
protected function setHtmlBody($view, array $data)
    {
        $this->message->builder()->setHtmlBody($this->renderView($view, $data));
    }
275019
protected function buffer($view, array $data = [])
    {
        // Extract variables.
        extract($data);

        // Start buffering.
        ob_start();

        // Load view file (root location is declared in viewsPath var).
        include $this->container->get('config')['viewsPath'] . '/' . $view . '.php';

        // Return string.       
        $buffer = ob_get_contents();
        ob_end_clean();
        return $buffer;
    }
618737
public function partial($view, array $data = array())
    {
        $layout = $this->layout;
        $this->layout = null;
        $this->render($view, $data);
        $this->layout = $layout;
    }
626694
protected function renderSuccessPage(array $data, ?string $view = null) : View
    {
        return $this->view->make($view ?? 'state.success')->with($data);
    }
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;
    }
237395
public function stream($view, $data = [])
    {
        $path = $this->processOutput($view, $data);

        return $this->responseStream($path);
    }
572221
private function render(string $view, $data = []) : Mail
  {
    $body = array(
      'body' => $this->body,
      'subject' => $this->subject
    );

    if ($this->body != null) {
      $data = array_merge($data, $body);
    }

    $this->outputdata = View::make($this->viewLocation, $data, true);
    return $this;
  }
328362
protected function renderView($view, $data)
    {
        return $view instanceof Htmlable
                        ? $view->toHtml()
                        : $this->views->make($view, $data)->render();
    }
287155
public function output($view, array $data = null)
	{
		$response = new Response($this->render($view, $data), Response::HTTP_OK, ['Content-Type' => 'text/html']);
		$response->send();
	}
317932
protected function view($view, $data = [], $mergeData = [])
    {
        $theme = config('log-viewer.theme');

        return view()->make("log-viewer::{$theme}.{$view}", $data, $mergeData);
    }
1188687
public function run($view, $data = array())
    {
        return parent::run(
            $view,
            \array_merge(View::get_additional_data($view, $data), $data)
        );
    }
1363517
static function render($view, array $data = []) {
        if (file_exists($view)) {
            if (is_array($data)) {
                foreach ($data as $_data => $_value) {
                    if (Config::get('security.anti_xss') && is_string($_value)) {
                        $_value = Text::entities($_value);
                    }
                    
                    $$_data = $_value;
                }
            } else {
                throw new \Lollipop\Exception\Runtime('Cannot define variable');
            }
        
            $file = new \SplFileInfo($view);
            $file_ext = strtolower($file->getExtension());
            
            
            ob_start();
            
            if ($file_ext == 'php' || $file_ext == 'phtml') {
                include($view);
            } else {
                readfile($view);
            }
            
            $output = ob_get_clean();
            
            return $output;
        }
        
        return false;
    }