You are here

function panels_allowed_layouts::panels_allowed_layouts in Panels 6.2

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

Constructor function; loads the $allowed_layout_settings array with initial values according to $start_allowed

Parameters

bool $start_allowed: $start_allowed determines whether all available layouts will be marked as allowed or not allowed on the initial call to panels_allowed_layouts::set_allowed()

File

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

Class

panels_allowed_layouts
Class definition for the allowed layouts governing structure.

Code

function panels_allowed_layouts($start_allowed = TRUE) {

  // TODO would be nice if there was a way to just fetch the names easily
  foreach ($this
    ->list_layouts() as $layout_name) {
    $this->allowed_layout_settings[$layout_name] = $start_allowed ? 1 : 0;
  }
}