Backend\Traits\CollapsableWidget
Overview
Collapsable Widget Trait Adds collapse/expand item features to back-end widgets
Public Properties
public string $collapseSessionKey
The key name to use when storing collapsed states in the session.
Protected Properties
protected array|false $collapseGroupStatusCache
Memory cache of collapsed states.
Public Methods
public onSetCollapseStatus()
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.
Protected Methods
protected getCollapseStatus()
protected getCollapseStatus(
string $group,
bool $default = true
): bool|string
Gets a collapsed state.
protected getCollapseStatuses()
protected getCollapseStatuses(): array
Returns the array of all collapsed states belonging to this widget.
protected setCollapseStatus()
protected setCollapseStatus(string $group, string $status): void
Sets a collapsed state.