Render the popover
@param \Piwik\Plugins\CoreHome\Controller $controller
@param View (the popover_rowevolution template)
174645
public function renderPopover($controller, $view)
    {
        // render main evolution graph
        $this->graphType = 'graphEvolution';
        $this->graphMetrics = $this->availableMetrics;
        $view->graph = $controller->getRowEvolutionGraph($fetch = true, $rowEvolution = $this);

        // render metrics overview
        $view->metrics = $this->getMetricsToggles();

        // available metrics text
        $metricsText = Piwik::translate('RowEvolution_AvailableMetrics');
        $popoverTitle = '';
        if ($this->rowLabel) {
            $icon = $this->rowIcon ? '<img height="16px" src="' . $this->rowIcon . '" alt="">' : '';
            $metricsText = sprintf(Piwik::translate('RowEvolution_MetricsFor'), $this->dimension . ': ' . $icon . ' ' . $this->rowLabel);
            $popoverTitle = $icon . ' ' . $this->rowLabel;
        }

        $view->availableMetricsText = $metricsText;
        $view->popoverTitle = $popoverTitle;

        return $view->render();
    }
808275
public function Run ($displayView = TRUE)
	{

		// Default to Route url processor if none is set

		if (!$this->urlProcessor)
		{
			$this->urlProcessor	= new Resource\Controller\URL\Route;
		}

		// Run url processor to work out the controller and action from URL

		$this->urlProcessor->Process ();

		// Set controller paths to look in

		$controllerPaths	= is_array ($this->controllerPath)? $this->controllerPath : [$this->controllerPath];

		// Look through paths to look for controller

		foreach ($controllerPaths as $controllerClass)
		{

			// Add module to the class path

			$controllerClass .= $this->controllerModule? '\\' . $this->controllerModule : NULL;

			// Check the controller and action exist

			if ($this->urlProcessor->findController ($controllerClass, $this->captureall))
			{
				break;
			}

		}

		// Error if the controller and action do not exist

		if (!class_exists ($this->urlProcessor->controller) || !method_exists ($this->urlProcessor->controller, $this->urlProcessor->action))
		{
			throw new Exception ('Invalid controller action: ' . $this->urlProcessor->controller . '\\' . $this->urlProcessor->action, 404);
		}

		// Create controller

		$controllerObj		= $this->urlProcessor->createController ($controllerClass);

		// Set controller module

		if ($this->controllerModule)
		{
			$controllerObj->module		= $this->controllerModule;
		}

		// Set controller view if none is set and one is set in the bootstrap

		if ($this->view && !$controllerObj->view)
		{
			$controllerObj->view	= $this->view;
		}

		// Set controller exception handler

		if ($this->useExceptionHandler)
		{
			set_exception_handler (array ($controllerObj, 'Exception'));
		}

		// If the controller action is public and is valid to call

		if (is_callable (array ($controllerObj, $controllerObj->action)) &&
			$controllerObj->isActionValid ())
		{

			// Call controller action

			$controllerObj->callAction ();

		}

		// Otherwise error 404

		else
		{
			throw new Exception ('Invalid controller action: ' . $controllerObj->controller . '\\' . $controllerObj->action, 404);
		}

		// Display view

		if ($displayView && $controllerObj->render)
		{
			$controllerObj->View ();
		}

		// Return controller

		return $controllerObj;

	}
1342100
public static function setAceScript(Controller $controller, $theme = 'chrome')
    {
        /* @var \yii\web\View $view */
        $view = $controller->getView();

        AceAsset::register($view);

        $view->registerJs(
            "$('textarea[data-editor]').each(function(index, element) {
                var textarea = $(this);

                var editDiv = $('<div>', {
                    width: textarea.width(),
                    height: textarea.height(),
                    class: textarea.attr('class')
                }).insertBefore(textarea);

                textarea.addClass('hidden');

                var editor = ace.edit(editDiv[0]);
                var mode = (textarea.data('editor')).trim();
                var theme = ('{$theme}').trim();
                editor.setReadOnly(textarea.data('read-only'));
                editor.getSession().setValue(textarea.val());
                if (mode.length !== 0) {
                    editor.getSession().setMode('ace/mode/' + mode);
                }
                if (theme.length !== 0) {
                    editor.setTheme('ace/theme/' + theme);
                }

                editor.getSession().on('change', function() {
                    textarea.val(editor.getSession().getValue());
                });
            });"
        );
    }
469663
private function callControllerMethod(Controller $controller, $method)
    {
        return app()->call([$controller, $method], ParameterBag::getParameters());
    }
492540
public function render($view, $params = array(), $context = null)
    {
        if ($context === null) {
            $context = $this->context;
        }

        return parent::render($view, $params, $context);
    }
343823
public function handleController($controller, $method)
    {
        if($this->app->findController($controller)) {
            $controllerClass = "App\\Controller\\".$controller;
            $this->controller = new $controllerClass();
        }
        if($this->app->hasMethod($this->controller, $method)) {
            self::$instance = $this;
            ob_start();
            $return = $this->controller->$method();
            $output = ob_get_clean();
            self::$instance = null;
        }
        if($return !== null) {
            //handle returned value
        }
        $output = $output ?: null;
        return $output;
    }
322743
public function hookTheme(Controller $controller)
    {
        if ($controller->isCurrentTheme('mobile') && !$controller->isInternalRoute()) {
            $this->setModuleAssets($controller);
            $this->setModuleMetaTags($controller);
        }
    }
791964
public function render($view, array $parameters = array(), $flag = false)
    {
        $content = $this->get('kernel.dispatch')->dispatch('handle.tpl')->render($view, $parameters);
        
        return $flag ? $content : $this->responseHtml($content);
    }
648057
final public function setView($controller, $action)
    {
        $this->view = new View($controller, $action);
        // To maintain compatibility with version 1.0
        $this->View = $this->view;
        // If Layout is enable, send new view to it
        if (isset($this->layout)) {
            $this->layout->setView($this->view);
            // To maintain compatibility with version 1.0
            $this->Layout = $this->layout;
        }
    }
1227537
public function render($controller, $template, $data)
    {
        $view = new View($controller);
        $css = array();
        $html = $view->mail($template, $data, $css);
        $cssToInlineStyles = new CssToInlineStyles();
        $cssToInlineStyles->setCSS($this->getCss($css));
        $cssToInlineStyles->setHTML($html);
        return $cssToInlineStyles->convert();
    }
493282
public function renderView() {
		$config = $this->getAppContextProperty("config");
		$globalUser = $this->getAppContextProperty("globalUser");
		$pages = $this->getAppContextProperty("pages");
		$page = $this->getAppContextProperty("page");
		$data = $this->getAppContextProperty("data");
		$app_http = $this->getAppContextProperty("app_http");
		$controllerName = $this->getAppContextProperty("controllerName");
		$systemMessages = $this->getAppContextProperty("systemMessages");
		
		include "{$this->getViewPath()}layouts/header.lo.php";
		if (!empty($this->getViewFile())) {
			$parameters = $this->getViewVariables();
			include $this->getViewFile();
		}
		include "{$this->getViewPath()}layouts/footer.lo.php";
	}
585206
protected function render($view)
    {
        $view = parent::render($view);
        if (!\Staq\Util::isStack($view, 'Stack\\View')) {
            $page = new \Stack\View;
            $page['content'] = $view;
            $view = $page;
        }
        return $view->render();
    }
523884
public function startup(Controller $controller) {
		if (!$this->_controller->ViewExtension->isHtml()) {
			return;
		}

		$this->_setConfigVar($controller);
	}
1069283
protected function Render($view="",$format = null)
	{
		$isSmarty = (strpos(get_class($this->RenderEngine),"Smarty") > -1);

		if ($isSmarty && $format == null) $format = self::$SmartyViewPrefix;

		if ($format == null) $format = '';

		if ($view == "")
		{
			// automatic binding
			$backtrace = debug_backtrace();
			$view = str_replace("Controller","", $backtrace[1]['class']) . $backtrace[1]['function'];
		}

		// if the render engine is Smarty then add the '.tpl' suffix
		$viewPath = $isSmarty ? $format.$view.".tpl" : $format.$view;

		// capture output instead of rendering if specified
		if ($this->CaptureOutputMode)
		{
			$this->DebugOutput = $this->RenderEngine->fetch($viewPath);
		}
		else
		{
			$this->RenderEngine->display($viewPath);
		}
	}
1272830
public function render(string $view, array $templateVars = []): string
    {
        return $this->renderer->render($view, $templateVars);
    }
836315
public function render($view, $model=''){
    if ( empty($model) && $this->has_data() ){
			$model = $this->data;
		}
    if ( \is_string($view) ){
      return \is_array($model) ? bbn\tpl::render($view, $model) : $view;
		}
		die(bbn\x::hdump("Problem with the template", $view, $this->path, $this->mode));
	}
1094859
public function render(\Zend_View_Interface $view = null)
    {
        if ($this->_getIsRendered()) {
            return;
        }

        $this->fixDecorators();

        return parent::render($view);
    }