phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
CustomRule.php
Go to the documentation of this file.
1<?php
3
5
14class CustomRule extends Rule {
15
16 protected $jsFunction;
17
18 public function __construct($type, $jsFunction, $prompt = NULL, $value = NULL) {
19 parent::__construct($type, $prompt, $value);
20 $this->jsFunction = $jsFunction;
21 }
22
23 public function compile(JsUtils $js) {
24 $js->exec(Rule::custom($this->getType(), $this->jsFunction), true);
25 }
26}
JQuery PHP library.
Definition JsUtils.php:23
exec($js, $immediatly=false)
Executes the code $js.
Ajax\semantic\components\validation$CustomRule This class is part of phpmv-ui.
__construct($type, $jsFunction, $prompt=NULL, $value=NULL)
static custom($name, $jsFunction)
Definition Rule.php:166