phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
Toast.php
Go to the documentation of this file.
1<?php
2
4
6
16
17 public function __construct(JsUtils $js=NULL) {
18 parent::__construct($js);
19 $this->uiName='toast';
20 }
21
22 public function close(){
23 return $this->addBehavior('close');
24 }
25
26 public function setClass($value){
27 $this->params['class']=$value;
28 return $this;
29 }
30
31 public function setCloseIcon(){
32 $this->params['closeIcon']=true;
33 return $this;
34 }
35
36 public function setShowIcon($value=false){
37 $this->params['showIcon']=$value;
38 return $this;
39 }
40
41 public function setPreserveHTML($value=false){
42 $this->params['preserveHTML']=$value;
43 return $this;
44 }
45
46 public function setCloseOnClick($value){
47 $this->params['closeOnClick']=$value;
48 return $this;
49 }
50
51 public function setTitle($title){
52 $this->params['title']=$title;
53 return $this;
54 }
55
56 public function setActions(array $actions){
57 foreach ($actions as &$action){
58 if(isset($action['click'])){
59 $js=\str_ireplace("\"","%quote%", $action['click']);
60 $action['click']="%function(){".$js."}%";
61 }
62 }
63 $this->params['actions']=$actions;
64 if(count($actions)>0) {
65 $this->params['displayTime'] = 0;
66 }
67 return $this;
68 }
69
70 public function setMessage($message){
71 $this->params['message']=$message;
72 return $this;
73 }
74
75 public function setPosition($position){
76 $this->params['position']=$position;
77 return $this;
78 }
79
80 public function setDisplayTime($time){
81 $this->params['displayTime']=$time;
82 return $this;
83 }
84
85 public function setShowProgress($value='top'){
86 $this->params['showProgress']=$value;
87 return $this;
88 }
89
90 public function setClassProgress($value){
91 $this->params['classProgress']=$value;
92 return $this;
93 }
94
95 public function setOnShow($jsCode) {
96 $this->addComponentEvent('onShow', $jsCode);
97 }
98
99 public function setOnHide($jsCode) {
100 $this->addComponentEvent('onHide', $jsCode);
101 return $this;
102 }
103
104 public function setOnApprove($jsCode) {
105 $this->addComponentEvent('onApprove', $jsCode);
106 return $this;
107 }
108
109 public function setOnDeny($jsCode) {
110 $this->addComponentEvent('onDeny', $jsCode);
111 return $this;
112 }
113}
JQuery PHP library.
Definition JsUtils.php:23
Ajax\semantic\components$Toast This class is part of phpMv-ui.
Definition Toast.php:15
setShowIcon($value=false)
Definition Toast.php:36
setActions(array $actions)
Definition Toast.php:56
__construct(JsUtils $js=NULL)
Definition Toast.php:17
setPreserveHTML($value=false)
Definition Toast.php:41
setShowProgress($value='top')
Definition Toast.php:85