1.20.x layout_flexible.class.inc LayoutFlexibleTemplate::__construct(array $config = array())

Constructor for a LayoutFlexibleTemplate class.

Parameters

array $config: An array of configuration data.

File

modules/layout/includes/layout_flexible.class.inc, line 48
Class that holds configuration for a flexible layout template configuration.

Class

LayoutFlexibleTemplate
@file Class that holds configuration for a flexible layout template configuration.

Code

function __construct(array $config = array()) {
  foreach ($config as $property => $property_value) {
    $this->{$property} = $property_value;
  }

  if (empty($this->rows)) {
    $uuid = new Uuid();
    $this->rows[$uuid->generate()] = array(
      'contains' => 'region_12',
      'element' => 'header',
      'classes' => '',
      'container' => 'container',
      'region_names' => array('region_name_0' => t('Header')),
    );
    $this->rows[$uuid->generate()] = array(
      'contains' => 'region_12',
      'element' => '',
      'classes' => '',
      'container' => 'container',
      'region_names' => array('region_name_0' => t('Content')),
    );
    $this->rows[$uuid->generate()] = array(
      'contains' => 'region_12',
      'element' => 'footer',
      'classes' => '',
      'container' => 'container',
      'region_names' => array('region_name_0' => t('Footer')),
    );
  }
}