5use Phalcon\DiInterface;
6use Phalcon\Di\InjectionAwareInterface;
8use Phalcon\Mvc\Controller;
12 public function setDi(DiInterface $di) {
22 return $this->_di->get(
"url")->get($url);
26 $controls=$view->getVar(
"q");
27 if (isset($controls) ===
false) {
30 $controls[$identifier]=$content;
31 $view->setVar(
"q", $controls);
35 $view->setVar($view_var,$output);
38 public function forward($initialController,$controller,$action,
$params=array()){
39 $dispatcher = $initialController->dispatcher;
40 $dispatcher->setControllerName($controller);
41 $dispatcher->setActionName($action);
42 $dispatcher->dispatch();
43 $template=$initialController->view->getRender($dispatcher->getControllerName(), $dispatcher->getActionName(),$dispatcher->getParams(), function ($view) {
44 $view->setRenderLevel(View::LEVEL_ACTION_VIEW);
50 list($controller,$action)=\explode(
"@", $viewName);
51 $template=$initialControllerInstance->view->getRender($controller, $action,
$params,
function ($view) {
52 $view->setRenderLevel(View::LEVEL_ACTION_VIEW);
58 $params=$dispatcher->getParams();
59 $action=$dispatcher->getActionName();
60 $items=array($dispatcher->getControllerName());
61 if(\
sizeof(
$params)>0 || \strtolower($action)!=
"index" ){
64 if(\is_object($p)===
false)
fromDispatcher($dispatcher)
Collects url parts from the request dispatcher : controllerName, actionName, parameters Used internal...
getUrl($url)
Generates an URL Used internally by phpMv.
renderContent($initialControllerInstance, $viewName, $params=NULL)
render the content of an existing view : $viewName and set the response to the modal content Used int...
forward($initialController, $controller, $action, $params=array())
Forwards to.
createScriptVariable(&$view, $view_var, $output)
Creates the script variable script_foot Used internally by phpMv.
addViewElement($identifier, $content, &$view)
Adds the array of controls q in the $view element Used internally by phpMv.