phpMv
-UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
SimpleSemExtComponent.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ajax\semantic\components
;
4
5
use
Ajax\common\components\SimpleExtComponent
;
6
use
Ajax\JsUtils
;
7
8
class
SimpleSemExtComponent
extends
SimpleExtComponent
{
9
protected
$paramParts
;
10
public
function
__construct
(
JsUtils
$js
=NULL) {
11
parent::__construct(
$js
);
12
$this->paramParts=array();
13
}
14
15
protected
function
addBehavior
($name) {
16
$this->paramParts[]=[$name];
17
return
$this;
18
}
19
20
protected
function
generateParamParts
(){
21
$results=[];
22
foreach
($this->paramParts as $paramPart){
23
$results[]=
"{$this->uiName}("
.\implode(
","
, $paramPart).
")"
;
24
}
25
return \implode(
"."
, $results);
26
}
27
28
public
function
getScript
() {
29
$allParams=
$this->params
;
30
$this->jquery_code_for_compile=array ();
31
$this->
compileJsCodes
();
32
$paramParts
=
""
;
33
if
(\
sizeof
($this->paramParts)>0){
34
$paramParts
=
"."
.$this->generateParamParts();
35
}
36
$this->jquery_code_for_compile []=
"$( \""
.$this->attachTo.
"\" ).{$this->uiName}("
.$this->
getParamsAsJSON
($allParams).
")"
.
$paramParts
.
";"
;
37
$this->
compileEvents
();
38
return
$this->
compileJQueryCode
();
39
}
40
41
public
function
setParamParts
(
$paramParts
) {
42
$this->paramParts=
$paramParts
;
43
return
$this;
44
}
45
46
public
function
addComponentEvent
($event,$jsCode){
47
$jsCode=\str_ireplace(
"\""
,
"%quote%"
, $jsCode);
48
return
$this->
setParam
($event,
"%function(module){"
.$jsCode.
"}%"
);
49
}
50
51
public
function
setJs
(
JsUtils
$js
){
52
$this->js=
$js
;
53
$js
->semantic()->addComponent($this, $this->attachTo, $this->params);
54
}
55
56
}
Ajax\JsUtils
JQuery PHP library.
Definition
JsUtils.php:23
Ajax\common\components\BaseComponent\$js
$js
Definition
BaseComponent.php:20
Ajax\common\components\BaseComponent\setParam
setParam($key, $value)
Definition
BaseComponent.php:35
Ajax\common\components\BaseComponent\getParamsAsJSON
getParamsAsJSON($params)
Definition
BaseComponent.php:26
Ajax\common\components\BaseComponent\$params
$params
Definition
BaseComponent.php:14
Ajax\common\components\SimpleComponent\compileEvents
compileEvents()
Definition
SimpleComponent.php:24
Ajax\common\components\SimpleComponent\compileJQueryCode
compileJQueryCode()
Definition
SimpleComponent.php:46
Ajax\common\components\SimpleExtComponent
Definition
SimpleExtComponent.php:7
Ajax\common\components\SimpleExtComponent\compileJsCodes
compileJsCodes()
Definition
SimpleExtComponent.php:22
Ajax\semantic\components\SimpleSemExtComponent
Definition
SimpleSemExtComponent.php:8
Ajax\semantic\components\SimpleSemExtComponent\setParamParts
setParamParts($paramParts)
Definition
SimpleSemExtComponent.php:41
Ajax\semantic\components\SimpleSemExtComponent\getScript
getScript()
Definition
SimpleSemExtComponent.php:28
Ajax\semantic\components\SimpleSemExtComponent\addComponentEvent
addComponentEvent($event, $jsCode)
Definition
SimpleSemExtComponent.php:46
Ajax\semantic\components\SimpleSemExtComponent\$paramParts
$paramParts
Definition
SimpleSemExtComponent.php:9
Ajax\semantic\components\SimpleSemExtComponent\setJs
setJs(JsUtils $js)
Definition
SimpleSemExtComponent.php:51
Ajax\semantic\components\SimpleSemExtComponent\__construct
__construct(JsUtils $js=NULL)
Definition
SimpleSemExtComponent.php:10
Ajax\semantic\components\SimpleSemExtComponent\generateParamParts
generateParamParts()
Definition
SimpleSemExtComponent.php:20
Ajax\semantic\components\SimpleSemExtComponent\addBehavior
addBehavior($name)
Definition
SimpleSemExtComponent.php:15
Ajax\semantic\components
Definition
Accordion.php:3
Ajax
semantic
components
SimpleSemExtComponent.php
Generated on Sun Dec 10 2023 16:16:00 for
phpMv-UI
by
doxygen
1.9.8