phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
Accordion.php
Go to the documentation of this file.
1<?php
3
8
16
17 public function __construct(JsUtils $js) {
18 parent::__construct($js);
19 $this->params = array(
20 "active" => 0
21 );
22 $this->uiName = "accordion";
23 }
24
37 public function setActive($value) {
38 return $this->setParam("active", $value);
39 }
40
55 public function setAnimate($value) {
56 if ($value instanceof Animation)
57 $value = $value->getParams();
58 else if (is_string($value)) {
59 $animation = new Animation();
60 $animation->setEasing($value);
61 }
62 $this->setParam("animate", $value);
63 return $this;
64 }
65
74 public function setCollapsible($value) {
75 return $this->setParamCtrl("collapsible", $value, "is_bool");
76 }
77
85 public function setDisabled($value) {
86 return $this->setParamCtrl("disabled", $value, "is_bool");
87 }
88
97 public function setEvent($value) {
98 $this->setParam("event", $value);
99 return $this;
100 }
101
113 public function setHeader($value) {
114 return $this->setParam("header", $value);
115 }
116
128 public function setHeightStyle($value) {
129 return $this->setParamCtrl("heightStyle", $value, array(
130 "auto",
131 "fill",
132 "content"
133 ));
134 }
135
146 public function setIcons($value) {
147 if (is_string($value)) {
148 if (JString::startsWith($value, "{"));
149 $value = "%" . $value . "%";
150 }
151 $this->setParam("icons", $value);
152 return $this;
153 }
154
163 public function onActivate($jsCode) {
164 return $this->addEvent("activate", $jsCode);
165 }
166
176 public function onBeforeActivate($jsCode) {
177 return $this->addEvent("beforeActivate", $jsCode);
178 }
179
187 public function onCreate($jsCode) {
188 return $this->addEvent("create", $jsCode);
189 }
190}
JQuery PHP library.
Definition JsUtils.php:23
Base component for JQuery UI visuals components.
Composant JQuery UI Accordion.
Definition Accordion.php:15
setActive($value)
Which panel is currently open.
Definition Accordion.php:37
onBeforeActivate($jsCode)
Triggered directly before a panel is activated.
setEvent($value)
The event that accordion headers will react to in order to activate the associated panel.
Definition Accordion.php:97
setHeader($value)
Selector for the header element, applied via .
onActivate($jsCode)
Triggered after a panel has been activated (after animation completes).
setAnimate($value)
If and how to animate changing panels.
Definition Accordion.php:55
setCollapsible($value)
Whether all the sections can be closed at once.
Definition Accordion.php:74
onCreate($jsCode)
Triggered when the accordion is created.
setIcons($value)
Icons to use for headers, matching an icon provided by the jQuery UI CSS Framework.
setHeightStyle($value)
Controls the height of the accordion and each panel.
setDisabled($value)
Disables the accordion if set to true.
Definition Accordion.php:85
Composant JQuery UI Animation property.
Definition Animation.php:12