Skip to content

Commit 42337f3

Browse files
committed
Add renderDefaultView (Controller/action.html)
1 parent 2ebdf0d commit 42337f3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Ajax/php/ubiquity/JsUtils.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,14 @@ public function renderView($viewName,$parameters=[],$asString=false){
5353
}
5454
throw new \Exception(get_class()." instance is not properly instancied : you omitted the second parameter \$controller!");
5555
}
56+
57+
/**
58+
* Performs jQuery compilation and displays the default view
59+
* @param mixed $parameters Variable or associative array to pass to the view <br> If a variable is passed, it will have the name <b> $ data </ b> in the view, <br>
60+
* If an associative array is passed, the view retrieves variables from the table's key names
61+
* @param boolean $asString If true, the view is not displayed but returned as a string (usable in a variable)
62+
*/
63+
public function renderDefaultView($parameters=[],$asString=false){
64+
return $this->renderView($this->injected->getDefaultViewName(),$parameters,$asString);
65+
}
5666
}

0 commit comments

Comments
 (0)