Returns view with the parameters passed by.

@param string $view   Name and location of the view within "theme/views" path.
@param array  $params View parameters passed by.

@return string
504173
public function get( $view, $params = array() )
	{
		$template = preg_replace( '/\./', '/', $view );

		$theme_path =  get_template_directory() . '/views/' . $template . '.php';

		$plugin_path = $this->views_path . $template . '.php';

		$path = is_readable( $theme_path )
			? $theme_path
			: ( is_readable( $plugin_path )
				? $plugin_path
				: null
			);

		if ( ! empty( $path ) ) {
			extract( $params );
			ob_start();
			include( $path );
			return ob_get_clean();
		} else {
			return;
		}
	}
837280
public function renderResource($view, array $parameters=[], $statusCode=200)
    {
        $this->findContentType()
            ->findViewType()
            ->buildViewTemplate($view)
            ->checkViewTemplateExists();

        $response = $this->createResponse($statusCode);
        $response->headers
            ->set('Content-Type', $this->contentType);

        return $this->render($this->viewTemplateName, $parameters, $response);
    }
910001
public function getViewPath($view)
    {
        if ($this->finder) {
            if (file_exists($file = $this->finder->find($view))) {
                return $file;
            }
        }

        if (file_exists($view)) {
            return $view;
        } elseif (file_exists($view . '.' . $this->extension)) {
            return $view . '.' . $this->extension;
        }

        foreach ($this->viewPaths as $viewPath) {
            if (file_exists($viewPath . '/' . $view . '.' . $this->extension)) {
                return $viewPath . '/' . $view . '.' . $this->extension;
            }
        }

        return null;
    }
1124006
public function view($view, $args = []){
        if(is_array($view)) {
            if(isset($view['theme'])) $this->theme($view['theme']);
            if(isset($view['layout'])) $this->layout($view['layout']);
            if(isset($view['cookie'])) $this->withCookie($view['cookie']);
            $statusCode = (isset($view['statusCode'])) ? $view['statusCode'] : 200;
                        
            if(empty($args)) 
                if(isset($view['args'])) $args = $view['args'];

            
            $view = $view['view'];
        }

        $this->uses($this->theme)->layout($this->layout);

        return $this->watch($view, $args)->render();
    }
1090503
public function render(string $view = null, array $params = null): \Illuminate\Contracts\Support\Renderable
    {
        $view = $view ? $view : 'column.treeControl';
        $params = $params ? $params : $this->toArray();

        return GridView::view($view, $params);
    }
508332
function getViewParams(url, view) {
  let match = view.regex.exec(url);
  if (match) {
    match.shift();
    return zip(view.params, match);
  } else {
    return null;
  }
}
1202405
private function getViewsFromModule(array $views)
	{
		foreach ($views as $key => $path)
			$this->views[$key] = $path;
	}
718436
public function findView($view)
	{
		$view = $this->viewFolder.DIRECTORY_SEPARATOR.ltrim($view, DIRECTORY_SEPARATOR);

		return $this->finder->findFileReversed($view);
	}
7426
protected function stream(string $view, array $params = []): StreamedResponse
    {
        $templateEngine = $this->getTemplateEngine();

        $callback = function () use ($templateEngine, $view, $params) {
            echo $templateEngine->render($view, $params);
        };

        $headers = $this->getResponse()->headers->all();

        return new StreamedResponse($callback, Response::HTTP_OK, $headers);
    }
1272830
public function render(string $view, array $templateVars = []): string
    {
        return $this->renderer->render($view, $templateVars);
    }
320152
protected function getView(Entity $entity, array $params = [])
    {
        switch (true) {
            case $entity instanceof ContentItem:
                $template = $entity->isIndex() ? 'index.twig' : 'entry.twig';
                $params['entry'] = $entity;
                break;
            case $entity instanceof Taxonomy:
                $template = 'taxonomy.twig';
                $params['taxonomy'] = $entity;
                break;
            case $entity instanceof Term:
                $template = 'term.twig';
                $params['term'] = $entity;
                break;
            default:
                throw new \LogicException('Cannot render entity of type '.get_class($entity));
        }

        return new View($template, $params);
    }
1187979
public function renderResponse($view, array $parameters = array(), Response $response = null)
    {
        return $this->getTemplating()->renderResponse($view, $parameters, $response);
    }
883227
public function render($view, $params = [])
  {
    // Check empty $params or not
    if (isset($params)) {
      $this->params = $params;
    }

    // Init Twig Template Engine   
    $loader = new \Twig_Loader_Filesystem('templates/');
    $twig = new \Twig_Environment($loader, array(
        'cache' => false
    ));

    // Default Global var and classes
    $twig->addGlobal('middleware', new Middleware());
    $twig->addGlobal('csrf_token', CsrfSecurity::generateCsrfToken());
    $twig->addGlobal('homePath', siteURL());

    // Add global var for all templates
    foreach($this->addGlobal as $addGlobal) {
       $twig->addGlobal($addGlobal['name'], $addGlobal['globalVar']);
    }

    // Add global Class for all templates
    foreach($this->addGlobalClass as $addGlobalClass) {
      $twig->addGlobal($addGlobalClass['name'], new $addGlobalClass['globalClass']());
    }

    // Render template
    echo $twig->render($view . '.tmp', $this->params);
  }
86393
public function render($view, array $parameters = array(), Response $response = null)
    {
        $template = $this->get('bruery_core.template_loader')->getTemplates();
        switch ($view) {
            case 'SonataUserBundle:Profile:show.html.twig':
                return parent::render($template['bruery_user.template.profile.show'], $parameters, $response);
                break;

            case 'SonataUserBundle:Profile:edit_authentication.html.twig':
                return parent::render($template['bruery_user.template.profile.edit_authentication'], $parameters, $response);
                break;

            case 'SonataUserBundle:Profile:edit_profile.html.twig':
                return parent::render($template['bruery_user.template.profile.edit'], $parameters, $response);
                break;

            default:
                return parent::render($view, $parameters, $response);
                break;
        }
    }
1317625
public function path(string $view): string
    {
        if (File::exists($view))
        {
            return $view;
        }

        list($bundle, $path) = explode(':', $view, 2);

        return $this->folder($bundle, $path);
    }
945361
protected function view($file, $param=array()) {
		extract($param);
		
		if (!is_array($file)) {
			$path =  explode('\\', get_class($this));

			if (count($path) > 2) {
				$view_path = '';

				for($i=0; $i<count($path)-2; $i++) {
					$view_path .= strtolower($path[$i]).'/';
				}	

				$view_path = Config::get('path.mvc').'/'.$view_path;
			} else {
				$view_path = Config::get('path.mvc');
			}

			if (php_sapi_name() == 'cli')
				$view_path = Config::get('path.basepath').'/'.$view_path;
		} else {
			
			$view_path = Config::get('path.mvc');
			if (isset($file[1])) {
				$view_path .= '/'.$file[0];
				$file = $file[1];
			} else
				$file = $file[0];

			if (php_sapi_name() == 'cli')
				$view_path = Config::get('path.basepath').'/'.$view_path; 
			
		}
		
		ob_start();
			include $view_path.'/views/'.$file.'.php';
		return ob_get_clean();
	}
521505
protected function makeView($view)
    {
        if( Auth::check() ) {
            $this->addParameter( 'activeUser', Auth::user() );
        }

        return View::make( $view, $this->parameters );
    }