CollapsableWidget

Collapsable Widget Trait Adds collapse/expand item features to back-end widgets

 trait Backend\Traits\CollapsableWidget

Properties

public $collapseSessionKey : string

The key name to use when storing collapsed states in the session.

protected $collapseGroupStatusCache : array | 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 Description
$group
string
$default
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 Description
$group
mixed
$default
boolean
Returns
mixed

protected getGroupStatuses ()

Returns
mixed

protected setCollapseStatus (string $group, string $status)

Sets a collapsed state.

Parameters
Property Description
$group
string
$status
string
Returns
mixed

protected setGroupStatus ($group, $status)

Parameters
Property Description
$group
mixed
$status
mixed
Returns
mixed

Used by

Class Description
ComponentList

Component list widget.

TemplateList

Template list widget.

Copyright © 2024 Winter CMS