You are here

function panels_allowed_layouts::__construct in Panels 7.3

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 91
Functions used by more than one panels client module.

Class

panels_allowed_layouts
Class definition for the allowed layouts governing structure.

Code

function __construct($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;
  }
}