1 block.class.inc Block::toArray()

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

Overrides LayoutHandler::toArray

File

core/modules/layout/includes/block.class.inc, line 340
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(
    'status' => $this->status,
    '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;
}