CollapsableWidget
Collapsable Widget Trait
Adds collapse/expand item features to back-end widgets
trait Backend\Traits\CollapsableWidget
Properties
public
$collapseSessionKey
:
string
= "groups"
The key name to use when storing collapsed states in the session.
protected
$collapseGroupStatusCache
:
array
|
false
= false
Memory cache of collapsed states.
Methods
public onGroupStatusUpdate ()
Returns
mixed
public onSetCollapseStatus () : void
AJAX handler to toggle a collapsed state. This should take two post variables:
- group: The collapsible group name
- status: The state of the group. Usually a 1 or a 0.
Returns
void
protected
getCollapseStatus (string $group, boolean $default = true
)
: bool | string
Gets a collapsed state.
Parameters
Property | Type | Description |
---|---|---|
$group | string |
string
|
$default | boolean |
boolean
|
Returns
bool | string
protected getCollapseStatuses () : array
Returns the array of all collapsed states belonging to this widget.
Returns
array
protected
getGroupStatus ($group, boolean $default = true
)
Parameters
Property | Type | Description |
---|---|---|
$group | mixed |
mixed
|
$default | boolean |
boolean
|
Returns
mixed
protected getGroupStatuses ()
Returns
mixed
protected setCollapseStatus (string $group, string $status)
Sets a collapsed state.
Parameters
Property | Type | Description |
---|---|---|
$group | string |
string
|
$status | string |
string
|
Returns
mixed
protected setGroupStatus ($group, $status)
Parameters
Property | Type | Description |
---|---|---|
$group | mixed |
mixed
|
$status | mixed |
mixed
|
Returns
mixed
Used by
Class | Description |
---|---|
ComponentList
|
Component list widget. |
TemplateList
|
Template list widget. |
Copyright © 2024 Winter CMS