phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
JsUtils.php
Go to the documentation of this file.
1<?php
2
4
5use Illuminate\Support\Facades\App;
6
7class JsUtils extends \Ajax\JsUtils{
8 public function getUrl($url){
9 return \url($url);
10 }
11 public function addViewElement($identifier,$content,&$view){
12 $controls=$view->__get("q");
13 if (isset($controls) === false) {
14 $controls=array ();
15 }
16 $controls[$identifier]=$content;
17 $view->__set("q", $controls);
18 }
19
20 public function createScriptVariable(&$view,$view_var, $output){
21 $view->__set($view_var,$output);
22 }
23
24 public function forward($initialControllerInstance,$controllerName,$actionName,$params=NULL){
25 \ob_start();
26 App::make($controllerName)->{$actionName}($params);
27 $result=\ob_get_contents();
28 \ob_end_clean();
29 return $result;
30 }
31
32 public function renderContent($initialControllerInstance,$viewName, $params=NULL) {
33 return \view()->make($viewName,$params)->render();
34 }
35
36 public function fromDispatcher($dispatcher){
37 return $dispatcher->segments();
38 }
39}
JQuery PHP library.
Definition JsUtils.php:23
fromDispatcher($dispatcher)
Collects url parts from the request dispatcher : controllerName, actionName, parameters Used internal...
Definition JsUtils.php:36
forward($initialControllerInstance, $controllerName, $actionName, $params=NULL)
Forwards to.
Definition JsUtils.php:24
getUrl($url)
Generates an URL Used internally by phpMv.
Definition JsUtils.php:8
renderContent($initialControllerInstance, $viewName, $params=NULL)
render the content of an existing view : $viewName and set the response to the modal content Used int...
Definition JsUtils.php:32
createScriptVariable(&$view, $view_var, $output)
Creates the script variable script_foot Used internally by phpMv.
Definition JsUtils.php:20
addViewElement($identifier, $content, &$view)
Adds the array of controls q in the $view element Used internally by phpMv.
Definition JsUtils.php:11