Documentation

CollapsableWidget

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

Tags
author

Alexey Bobkov, Samuel Georges

Table of Contents

$collapseSessionKey  : string
$collapseGroupStatusCache  : array<string|int, mixed>|false
onGroupStatusUpdate()  : mixed
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.
getCollapseStatus()  : bool|string
Gets a collapsed state.
getCollapseStatuses()  : array<string|int, mixed>
Returns the array of all collapsed states belonging to this widget.
getGroupStatus()  : mixed
getGroupStatuses()  : mixed
setCollapseStatus()  : mixed
Sets a collapsed state.
setGroupStatus()  : mixed

Properties

$collapseSessionKey

public string $collapseSessionKey = 'groups'

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

$collapseGroupStatusCache

protected array<string|int, mixed>|false $collapseGroupStatusCache = false

Memory cache of collapsed states.

Methods

onGroupStatusUpdate()

public onGroupStatusUpdate() : mixed
Tags
deprecated

onGroupStatusUpdate is deprecated. Please update onSetCollapseStatus instead.

Return values
mixed

onSetCollapseStatus()

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.

public onSetCollapseStatus() : void
Return values
void

getCollapseStatus()

Gets a collapsed state.

protected getCollapseStatus(string $group[, bool $default = true ]) : bool|string
Parameters
$group : string
$default : bool = true
Return values
bool|string

getCollapseStatuses()

Returns the array of all collapsed states belonging to this widget.

protected getCollapseStatuses() : array<string|int, mixed>
Return values
array<string|int, mixed>

getGroupStatus()

protected getGroupStatus(mixed $group[, mixed $default = true ]) : mixed
Parameters
$group : mixed
$default : mixed = true
Tags
deprecated
  • getGroupStatus is deprecated. Please update getCollapseStatus instead.
Return values
mixed

getGroupStatuses()

protected getGroupStatuses() : mixed
Tags
deprecated
  • getGroupStatuses is deprecated. Please update getCollapseStatuses instead.
Return values
mixed

setCollapseStatus()

Sets a collapsed state.

protected setCollapseStatus(string $group, string $status) : mixed
Parameters
$group : string
$status : string
Return values
mixed

setGroupStatus()

protected setGroupStatus(mixed $group, mixed $status) : mixed
Parameters
$group : mixed
$status : mixed
Tags
deprecated
  • setGroupStatus is deprecated. Please update setCollapseStatus instead.
Return values
mixed

Search results