6use Cake\Routing\Router;
8use Cake\Network\Response;
13 return Router::url($url);
16 $viewVars=$view->viewVars;
17 if (isset($viewVars[
"q"]) ===
false) {
20 $controls=$viewVars[
"q"];
22 $controls[$identifier]=$content;
23 $view->set(
"q", $controls);
27 $view->set($view_var,$output);
37 public function forward($initialControllerInstance,$controllerName,$actionName,
$params=array()){
42 $url=h(Router::url(\array_merge([
43 'controller' => $controllerName,
44 'action' => $actionName],
$params),
false
46 $base=Router::url(
"/");
47 if (substr($url, 0, strlen($base)) == $base) {
48 $url = substr($url, strlen($base));
50 $initialControllerInstance->requestAction($url);
51 $result=\ob_get_contents();
57 $view =
new View(Router::getRequest(
true),
new Response());
63 return $view->render($viewName);
67 return \explode(
"/", Router::getRequest(
true)->url);
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...
createScriptVariable(&$view, $view_var, $output)
Creates the script variable script_foot Used internally by phpMv.
forward($initialControllerInstance, $controllerName, $actionName, $params=array())
addViewElement($identifier, $content, &$view)
Adds the array of controls q in the $view element Used internally by phpMv.