phpMv  -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
JsUtils.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Ajax\php\laravel;
4 
6 
7 class 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 }
forward($initialControllerInstance, $controllerName, $actionName, $params=NULL)
Definition: JsUtils.php:24
renderContent($initialControllerInstance, $viewName, $params=NULL)
Definition: JsUtils.php:32
addViewElement($identifier, $content, &$view)
Definition: JsUtils.php:11
fromDispatcher($dispatcher)
Definition: JsUtils.php:36
JQuery PHP library.
Definition: JsUtils.php:23
createScriptVariable(&$view, $view_var, $output)
Definition: JsUtils.php:20