phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
|
Public Member Functions | |
inline ($script, $cdata=true) | |
getUrl ($url) | |
addViewElement ($identifier, $content, &$view) | |
createScriptVariable (&$view, $view_var, $output) | |
forward ($initialController, $controller, $action, $params=array()) | |
renderContent ($initialControllerInstance, $viewName, $params=NULL) | |
fromDispatcher ($dispatcher) | |
renderView ($viewName, $parameters=[], $asString=false) | |
Performs jQuery compilation and displays a view. More... | |
renderComponent (BaseHtml $component, bool $asString=false) | |
Compile and render a component. More... | |
renderDefaultView ($parameters=[], $asString=false) | |
Performs jQuery compilation and displays the default view. More... | |
execJSFromFile ($jsFile, $parameters=[], $immediatly=true) | |
Loads and eventually executes a jsFile with php parameters, using the default template engine. More... | |
ajaxValidationRule (string $ruleName, string $checkUrl, string $params='{_value:value}', string $method='post') | |
Adds a new semantic validation ajax rule. More... | |
checkValidationRule ($callback) | |
Checks a validation rule declared with . More... | |
applyInverted () | |
![]() | |
getUrl ($url) | |
Generates an URL Used internally by phpMv. More... | |
addViewElement ($identifier, $content, &$view) | |
Adds the array of controls q in the $view element Used internally by phpMv. More... | |
createScriptVariable (&$view, $view_var, $output) | |
Creates the script variable script_foot Used internally by phpMv. More... | |
forward ($initialController, $controller, $action, $params) | |
Forwards to. More... | |
renderContent ($initialControllerInstance, $viewName, $params=NULL) | |
render the content of an existing view : $viewName and set the response to the modal content Used internally by phpMv More... | |
fromDispatcher ($dispatcher) | |
Collects url parts from the request dispatcher : controllerName, actionName, parameters Used internally by phpMv. More... | |
ui (JqueryUI $ui=NULL) | |
getter or setter of the jQuery-UI variable More... | |
bootstrap (Bootstrap $bootstrap=NULL) | |
getter or setter of the Twitter Bootstrap variable More... | |
semantic (Semantic $semantic=NULL) | |
getter or setter of the Semantic-UI variable More... | |
config ($config=NULL) | |
__construct ($params=array(), $injected=NULL) | |
__set ($property, $value) | |
getParam ($key) | |
output ($array_js) | |
Outputs the called javascript to the screen. More... | |
compile (&$view=NULL, $view_var='script_foot', $script_tags=TRUE) | |
gather together all script needing to be output More... | |
clear_compile () | |
Clears the array of script events collected for output. More... | |
getScript ($offset=0) | |
scriptCount () | |
inline ($script, $cdata=TRUE) | |
Outputs a <script> tag. More... | |
generate_json ($result=NULL, $match_array_type=FALSE) | |
Can be passed a database result or associative array and returns a JSON formatted string. More... | |
_prep_args ($result, $is_key=FALSE) | |
Ensures a standard json value and escapes values. More... | |
_add_event ($element, $js, $event, $preventDefault=false, $stopPropagation=false, $immediatly=true, $listenerOn=false) | |
Constructs the syntax for an event, and adds to into the array for compilation. More... | |
getInjected () | |
setParam (string $param, $value) | |
Static Public Member Functions | |
static | diSemantic ($controller, $options=[ 'defer'=> true, 'gc'=> true]) |
Returns an instance of JsUtils initialized with Semantic (for di injection) More... | |
static | diBootstrap ($controller, $options=[ 'defer'=> true, 'gc'=> true]) |
Returns an instance of JsUtils initialized with Bootstrap (for di injection) More... | |
Protected Member Functions | |
_open_script ($src='') | |
Outputs an opening <script> More... | |
![]() | |
initialize () | |
To override for special initialization of the component. More... | |
Additional Inherited Members | |
![]() | |
$params | |
$injected | |
$_ui | |
$_bootstrap | |
$_semantic | |
$config | |
Definition at line 11 of file JsUtils.php.
|
protected |
Outputs an opening <script>
string | $src |
Definition at line 19 of file JsUtils.php.
addViewElement | ( | $identifier, | |
$content, | |||
& | $view | ||
) |
Definition at line 41 of file JsUtils.php.
ajaxValidationRule | ( | string | $ruleName, |
string | $checkUrl, | ||
string | $params = '{_value:value}' , |
||
string | $method = 'post' |
||
) |
Adds a new semantic validation ajax rule.
To use with in controllers.
string | $ruleName | |
string | $checkUrl | |
string | $params | |
string | $method |
Definition at line 174 of file JsUtils.php.
applyInverted | ( | ) |
Definition at line 193 of file JsUtils.php.
checkValidationRule | ( | $callback | ) |
Checks a validation rule declared with .
$callback | a callback using the value to validate : function($value){} |
Definition at line 183 of file JsUtils.php.
createScriptVariable | ( | & | $view, |
$view_var, | |||
$output | |||
) |
Definition at line 50 of file JsUtils.php.
|
static |
Returns an instance of JsUtils initialized with Bootstrap (for di injection)
\Ubiquity\controllers\Controller | $controller | |
array | $options |
Definition at line 155 of file JsUtils.php.
|
static |
Returns an instance of JsUtils initialized with Semantic (for di injection)
\Ubiquity\controllers\Controller | $controller | |
array | $options |
Definition at line 138 of file JsUtils.php.
execJSFromFile | ( | $jsFile, | |
$parameters = [] , |
|||
$immediatly = true |
|||
) |
Loads and eventually executes a jsFile with php parameters, using the default template engine.
string | $jsFile | |
array | $parameters | |
boolean | $immediatly |
Definition at line 120 of file JsUtils.php.
forward | ( | $initialController, | |
$controller, | |||
$action, | |||
$params = array() |
|||
) |
Definition at line 54 of file JsUtils.php.
fromDispatcher | ( | $dispatcher | ) |
Definition at line 62 of file JsUtils.php.
getUrl | ( | $url | ) |
Definition at line 37 of file JsUtils.php.
inline | ( | $script, | |
$cdata = true |
|||
) |
Definition at line 29 of file JsUtils.php.
renderComponent | ( | BaseHtml | $component, |
bool | $asString = false |
||
) |
Compile and render a component.
BaseHtml | $component | |
bool | $asString |
Definition at line 93 of file JsUtils.php.
renderContent | ( | $initialControllerInstance, | |
$viewName, | |||
$params = NULL |
|||
) |
Definition at line 58 of file JsUtils.php.
renderDefaultView | ( | $parameters = [] , |
|
$asString = false |
|||
) |
Performs jQuery compilation and displays the default view.
mixed | $parameters | Variable or associative array to pass to the view If a variable is passed, it will have the name $ data </ b> in the view, If an associative array is passed, the view retrieves variables from the table's key names |
boolean | $asString | If true, the view is not displayed but returned as a string (usable in a variable) |
Definition at line 107 of file JsUtils.php.
renderView | ( | $viewName, | |
$parameters = [] , |
|||
$asString = false |
|||
) |
Performs jQuery compilation and displays a view.
string | $viewName | |
mixed | $parameters | Variable or associative array to pass to the view If a variable is passed, it will have the name $ data </ b> in the view, If an associative array is passed, the view retrieves variables from the table's key names |
boolean | $asString | If true, the view is not displayed but returned as a string (usable in a variable) |
Definition at line 76 of file JsUtils.php.