function panels_allowed_layouts::list_layouts in Panels 5.2
Same name and namespace in other branches
- 6.3 includes/common.inc \panels_allowed_layouts::list_layouts()
- 6.2 includes/common.inc \panels_allowed_layouts::list_layouts()
- 7.3 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::panels_allowed_layouts in includes/
common.inc - Constructor function; loads the $allowed_layout_settings array with initial values according to $start_allowed
- 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().
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)) {
panels_load_include('plugins');
$layouts = array_keys(panels_get_layouts());
}
return $layouts;
}