1.20.x block.class.inc Block::toArray()

Convert the configuration of this block to an array for storage.

Overrides LayoutHandler::toArray

File

modules/layout/includes/block.class.inc, line 320
A class that wraps around a block to store settings information.

Class

Block
@file A class that wraps around a block to store settings information.

Code

function toArray() {
  $array = array(
    'module' => $this->module,
    'delta' => $this->delta,
    'settings' => $this->settings,
    'uuid' => $this->uuid,
    'style' => array(
      'plugin' => $this->style->plugin,
      'data' => $this->style->toArray(),
    ),
  );
  foreach ($this->conditions as $condition) {
    $array['conditions'][] = array(
      'plugin' => $condition->plugin,
      'data' => $condition->toArray(),
    );
  }
  return $array;
}