You are here

public function PatternViewDisplay::export in Patterns 6.2

File

./pattern.class.php, line 163

Class

PatternViewDisplay

Code

public function export() {
  $array = array(
    'name' => $this->name,
    'display_title' => $this->display_title,
    'display_id' => $this->display_id,
    'section' => $this->sections,
  );

  // Avoiding an error from an empty item array
  if ($this->items) {
    $array = array_merge($array, array(
      'item' => $this->items,
    ));
  }
  return $array;
}