Backend\Traits\CollapsableWidget

Source: ~/modules/backend/traits/CollapsableWidget.php

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 void onGroupStatusUpdate()

public void 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.

Protected methods

protected bool|string getCollapseStatus(string $group, bool $default=true)

Gets a collapsed state.

Parameters
  • string $group
  • bool $default

protected array getCollapseStatuses()

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

protected void getGroupStatus($group, $default=true)
Parameters
  • $group
  • $default

protected void getGroupStatuses()

protected void setCollapseStatus(string $group, string $status)

Sets a collapsed state.

Parameters
  • string $group
  • string $status

protected void setGroupStatus($group, $status)
Parameters
  • $group
  • $status