You are here

function panels_allowed_layouts::list_layouts in Panels 7.3

Same name and namespace in other branches
  1. 5.2 includes/common.inc \panels_allowed_layouts::list_layouts()
  2. 6.3 includes/common.inc \panels_allowed_layouts::list_layouts()
  3. 6.2 includes/common.inc \panels_allowed_layouts::list_layouts()

Snag a list of the current layouts for internal use.

Data is not saved in a class member in order to ensure that it's fresh.

Return value

array $layouts An indexed array of the system names for all currently available layouts.

2 calls to panels_allowed_layouts::list_layouts()
panels_allowed_layouts::sync_with_available in includes/common.inc
Checks for newly-added layouts and deleted layouts. If any are found, updates panels_allowed_layouts::allowed_layout_settings; new additions are made according to panels_allowed_layouts::allow_new, while deletions are unset().
panels_allowed_layouts::__construct in includes/common.inc
Constructor function; loads the $allowed_layout_settings array with initial values according to $start_allowed.

File

includes/common.inc, line 211
Functions used by more than one panels client module.

Class

panels_allowed_layouts
Class definition for the allowed layouts governing structure.

Code

function list_layouts() {
  static $layouts = array();
  if (empty($layouts)) {
    ctools_include('plugins', 'panels');
    $layouts = array_keys(panels_get_layouts());
  }
  return $layouts;
}