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 Class Reference

Composant JQuery UI Accordion. More...

+ Inheritance diagram for Accordion:

Public Member Functions

 __construct (JsUtils $js)
 
 setActive ($value)
 Which panel is currently open.
 
 setAnimate ($value)
 If and how to animate changing panels.
 
 setCollapsible ($value)
 Whether all the sections can be closed at once.
 
 setDisabled ($value)
 Disables the accordion if set to true.
 
 setEvent ($value)
 The event that accordion headers will react to in order to activate the associated panel.
 
 setHeader ($value)
 Selector for the header element, applied via .
 
 setHeightStyle ($value)
 Controls the height of the accordion and each panel.
 
 setIcons ($value)
 Icons to use for headers, matching an icon provided by the jQuery UI CSS Framework.
 
 onActivate ($jsCode)
 Triggered after a panel has been activated (after animation completes).
 
 onBeforeActivate ($jsCode)
 Triggered directly before a panel is activated.
 
 onCreate ($jsCode)
 Triggered when the accordion is created.
 
- Public Member Functions inherited from SimpleComponent
 getScript ()
 
 attach ($identifier)
 
 addEvent ($event, $jsCode)
 
 on ($event, $jsCode)
 
 getAttachTo ()
 
 getItemSelector ()
 
 setItemSelector ($itemSelector)
 
- Public Member Functions inherited from BaseComponent
 setParam ($key, $value)
 
 getParam ($key)
 
 getParams ()
 
 compile (JsUtils $js=NULL)
 
 setParams ($params)
 
 addParams ($params)
 
 setDebug ($value)
 
 setVerbose ($value)
 

Additional Inherited Members

- Data Fields inherited from BaseComponent
 $jquery_code_for_compile =array ()
 
- Protected Member Functions inherited from SimpleComponent
 compileEvents ()
 
 _createSelector ($itemSelector, $selector)
 
 compileJQueryCode ()
 
 setParamCtrl ($key, $value, $typeCtrl)
 
- Protected Member Functions inherited from BaseComponent
 getParamsAsJSON ($params)
 
- Protected Attributes inherited from SimpleComponent
 $attachTo
 
 $itemSelector
 
 $uiName
 
 $events
 
- Protected Attributes inherited from BaseComponent
 $params =array ()
 
 $js
 

Detailed Description

Composant JQuery UI Accordion.

Author
jc
Version
1.001

Definition at line 15 of file Accordion.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( JsUtils  $js)

Reimplemented from SimpleComponent.

Definition at line 17 of file Accordion.php.

Member Function Documentation

◆ onActivate()

onActivate (   $jsCode)

Triggered after a panel has been activated (after animation completes).

If the accordion was previously collapsed, ui.oldHeader and ui.oldPanel will be empty jQuery objects. If the accordion is collapsing, ui.newHeader and ui.newPanel will be empty jQuery objects.

Parameters
string$jsCode
Returns
$this

Definition at line 163 of file Accordion.php.

◆ onBeforeActivate()

onBeforeActivate (   $jsCode)

Triggered directly before a panel is activated.

Can be canceled to prevent the panel from activating. If the accordion is currently collapsed, ui.oldHeader and ui.oldPanel will be empty jQuery objects. If the accordion is collapsing, ui.newHeader and ui.newPanel will be empty jQuery objects.

Parameters
string$jsCode
Returns
$this

Definition at line 176 of file Accordion.php.

◆ onCreate()

onCreate (   $jsCode)

Triggered when the accordion is created.

If the accordion is collapsed, ui.header and ui.panel will be empty jQuery objects.

Parameters
string$jsCode
Returns
$this

Definition at line 187 of file Accordion.php.

◆ setActive()

setActive (   $value)

Which panel is currently open.

Multiple types supported: Boolean: Setting active to false will collapse all panels. This requires the collapsible option to be true. Integer: The zero-based index of the panel that is active (open). A negative value selects panels going backward from the last panel.

Parameters
Boolean$valuedefault : 0
Returns
$this

Definition at line 37 of file Accordion.php.

◆ setAnimate()

setAnimate (   $value)

If and how to animate changing panels.

Multiple types supported: Boolean: A value of false will disable animations. Number: Duration in milliseconds with default easing. String: Name of easing to use with default duration. Object: Animation settings with easing and duration properties. Can also contain a down property with any of the above options. "Down" animations occur when the panel being activated has a lower index than the currently active panel.

Parameters
mixed$valuedefault : {}
Returns
$this

Definition at line 55 of file Accordion.php.

◆ setCollapsible()

setCollapsible (   $value)

Whether all the sections can be closed at once.

Allows collapsing the active section.

Parameters
Boolean$valuedefault : false
Returns
$this

Definition at line 74 of file Accordion.php.

◆ setDisabled()

setDisabled (   $value)

Disables the accordion if set to true.

Parameters
Boolean$valuedefault : false
Returns
$this

Definition at line 85 of file Accordion.php.

◆ setEvent()

setEvent (   $value)

The event that accordion headers will react to in order to activate the associated panel.

Multiple events can be specified, separated by a space.

Parameters
string$valuedefault : click
Returns
$this

Definition at line 97 of file Accordion.php.

◆ setHeader()

setHeader (   $value)

Selector for the header element, applied via .

find() on the main accordion element. Content panels must be the sibling immediately after their associated headers.

Parameters
string$valuecss/JQuery Selector default : "> li > :first-child,> :not(li):even"
Returns
$this

Definition at line 113 of file Accordion.php.

◆ setHeightStyle()

setHeightStyle (   $value)

Controls the height of the accordion and each panel.

Possible values: "auto": All panels will be set to the height of the tallest panel. "fill": Expand to the available height based on the accordion's parent height. "content": Each panel will be only as tall as its content.

Parameters
String$valuedefault : content
Returns
$this

Definition at line 128 of file Accordion.php.

◆ setIcons()

setIcons (   $value)

Icons to use for headers, matching an icon provided by the jQuery UI CSS Framework.

Set to false to have no icons displayed. header (string, default: "ui-icon-triangle-1-e") activeHeader (string, default: "ui-icon-triangle-1-s")

Parameters
String$valuedefault : { "header": "ui-icon-triangle-1-e", "activeHeader": "ui-icon-triangle-1-s" }
Returns
$this

Definition at line 146 of file Accordion.php.


The documentation for this class was generated from the following file: