Renders the page with the given controller name.

@param string $controllerName Name of the controller
17637
public function render($controllerName)
    {
        $controller = $this->getControllerName($controllerName);
        if (null === $controller) {
            throw new ControllerNotFoundException(sprintf('Could not find controller "%s".', $controllerName));
        }

        $route = $this->getRoute($controller);
        if (null === $route) {
            throw new RouteNotFoundException(sprintf('Could not find route for controller "%s".', $controllerName));
        }

        $this->routeRenderer->render($route[1], $route[0]);
    }
451826
public function render($routeName)
    {
        $breadcrumb = $this->collection->get($routeName);

        if (null === $breadcrumb) {
            return '';
        }

        return view('avored-framework::breadcrumb.index')
                ->with('breadcrumb', $breadcrumb);
    }
794781
public function setControllerName( $controllerName )
    {
        $controllerName = strtolower( $controllerName );

        $controllerName = str_replace("controller", "", $controllerName);

        $controllerName = ucfirst($controllerName) . "Controller";

        $this->_controllerName = $controllerName;
    }
1088456
public function setUrl($pageName, $controller)
    {
        $params = [
            'id'   => $this->id,
            'slug' => $this->slug
        ];

        return $this->url = $controller->pageUrl($pageName, $params, false);
    }
1108770
protected function render($viewName, $params = [])
    {
        $e = new ViewRenderEvent();
        $this->trigger(self::EVENT_BEFORE_RENDER, $e);
        $result = (string)$e->content;

        $result .= $this->controller->getView()->render($viewName, $params, $this->controller);


        //$result .= $this->controller->render($viewName);

        $e = new ViewRenderEvent();
        $this->trigger(self::EVENT_AFTER_RENDER, $e);
        $result .= (string)$e->content;

        return $this->controller->renderContent($result);
    }
233382
public function controllerClassNameStrategy($name)
    {
        $names = explode('_', $name);
        $names = array_map('ucfirst', $names);
        return join('\\', $names) . 'Controller';
    }
484810
public function renderSectionHeader(string $sectionName) : void
    {
        if ($this->isSilent()) {
            return;
        }

        fwrite($this->file, '  ' . $this->formatter->formatPropertyName($sectionName) . ': ');
    }
725362
public function render($controller = null)
    {
        // If we have parent module connection and have no view set
        if (isset($this->parent) && $this->view_path == false /*&& !method_exists($this, $controller)*/) {
            // Merge current and parent module view data
            $this->parent->view_data = array_merge($this->parent->view_data, $this->view_data);
            // Set internal view context data pointer
            $this->parent->data = &$this->parent->view_data[$this->parent->view_context];
            // Call parent render
            $this->parent->render($controller);
        } else { // Call default module behaviour
            parent::render($controller);
        }
    }
434251
public function canAccessController(string $controllerName): bool
    {
        if (!isset($this->controllerDefaults[$controllerName])) {
            return false;
        }
        $requiredRoles = $this->controllerDefaults[$controllerName];
        if (!$requiredRoles) {
            return true;
        }

        if (!$this->user) {
            return false;
        }

        foreach ($requiredRoles as $role) {
            if ($this->hasRoleWithName($role)) {
                return true;
            }
        }

        return false;
    }
628224
private function _controllerFor($name)
	{
		if(isset($this->_controllers[$name]) && is_string($this->_controllers[$name]))
		{
			return $this->_controllerFor($this->_controllers[$name]);
		}
		else if(isset($this->_controllers[$name]) && is_object($this->_controllers[$name]))
		{
			return $this->_controllers[$name];
		}
		else if(isset($this->_controllerFactory))
		{
			return $this->_controllerFactory->resolve($name);
		}
		else
		{
			throw new Exception("No controller found for $name");
		}
	}
387185
public function canRender(ControllerContext $controllerContext)
    {
        $this->setControllerContext($controllerContext);
        try {
            $this->getTemplateSource();
            return true;
        } catch (Exception\InvalidTemplateResourceException $e) {
            return false;
        }
    }
908559
public function controller($name)
    {
        $fileName = "{$name}.php";

        if (isset($this->arguments[2])) {
            $actions = explode(',', $this->arguments[2]);

            if (count($actions) == 0) {
                $actions = array('index');
            }

        } else {
            $actions = array('index');
        }

        $file = $this->appPath . "/Controllers/" . $fileName;
        $class = $name;
        $date = date("n/j/Y");
        $contents = array('<?php');
        $contents[] = '/*';
        $contents[] = " * {$name} controller";
        $contents[] = ' *';
        $contents[] = ' * @author ';
        $contents[] = ' * @version 1.0';
        $contents[] = " * @date $date";
        $contents[] = ' */';
        $contents[] = '';
        $contents[] = 'namespace Controllers;';
        $contents[] = 'use \Core\Controller;';
        $contents[] = '';
        $contents[] = 'class ' . $class . ' extends Controller';
        $contents[] = '{';

        foreach ($actions as $action) {
            $contents[] = "";
            $contents[] = "    public function " . $action . "Action()";
            $contents[] = "    {";
            $contents[] = "        ";
            $contents[] = "    }";
            $contents[] = "";
        }

        $contents[] = '}';

        if (file_put_contents($file, implode("\n", $contents))) {
            echo Utils::colorize('Create ' . $file, 'SUCCESS');

            return true;
        } else {
            echo Utils::colorize('Can\'t create ' . $file, 'FAILURE');

            return false;
        }
    }
204431
public function renderAjaxBlock(
        \Twig_Environment $environment,
        $controllerName,
        array $controllerParams = array(),
        array $options = array())
    {
        $routeParams = array('_ajaxController' => $controllerName) + $controllerParams;
        $controllerParams[AjaxBlockControllerEventListener::JGP_AJAX_BLOCK_TAG] = true;
        $options = array_merge($this->defaultOptions, $options);

        $variables = array(
            'controllerName' => $controllerName,
            'controllerParams' => $controllerParams,
            'routeName' => 'jgp_ajax_block',
            'routeParams' => $routeParams,
            'autoload' => isset($options['autoload']) && $options['autoload'],
        );

        $template = 'AjaxBlocksBundle::ajax_block.html.twig';
        return $environment->render($template, $variables);
    }
148970
public function render($controller, $template, $data = array())
    {
        $view = new View($controller);
        $data = $view->display($template, $data);
        $this->pdf->AddPage();
        $this->pdf->writeHTML($data, true, false, true, false, '');
        return $data;
    }
864756
function performAction($controller,$action,$queryString = null,$render = 0) {
		$controllerFile = ROOT . '/application/controllers/' . $controller . "controller.php";
		//print "Trying to load $controllerFile<br>";
		if (file_exists($controllerFile)){
			//print "File exists<br>";
			include_once($controllerFile);
		} else {
			throw new Exception("Controller file: $controllerFile does not exists");
		}
		$controllerName = ucfirst($controller).'Controller';
		$actionName= $action . 'Action'; // This is done to avoid clash with reserved function names like list();
		if (class_exists($controllerName)){
			
		} else {
			throw new Exception("ControllerClass: $controllerName does not exists");
		}

		//print "Trying to load $controllerName<br>"; 
		$dispatch = new $controllerName($controller, $action);
		$dispatch->render = $render;
		$dispatch->$actionName($queryString);

		if ($dispatch->render >0) {
				$dispatch->display();
		}

	}
728205
public function setControllerName($name = 'index')
    {
        $name = $this->prepareName($name) . 'Controller';

        $this->controllerName = $name;

        $this->controller = $this->di->has($name)
            ? $this->di->get($name)
            : null;
    }
931049
protected function controllerWithoutMethod($controllername)
    {
        if (str_contains($controller = $controllername, '@')) {
            return ucfirst(substr($controllername, 0, strpos($controllername, '@')));
        }
        return ucfirst($controllername);
    }