You are here

public function PagererPreset::getPaneData in Pagerer 8.2

Same name and namespace in other branches
  1. 8 src/Entity/PagererPreset.php \Drupal\pagerer\Entity\PagererPreset::getPaneData()

Gets a pane configuration element.

Parameters

string $pane: The pane (left|center|right).

string $key: The configuration element as a string where '.' identifies array nesting.

Return value

string|array|null The configuration element.

1 call to PagererPreset::getPaneData()
PagererPreset::preSave in src/Entity/PagererPreset.php
Acts on an entity before the presave hook is invoked.

File

src/Entity/PagererPreset.php, line 117

Class

PagererPreset
Defines a Pagerer preset configuration entity.

Namespace

Drupal\pagerer\Entity

Code

public function getPaneData($pane, $key = NULL) {
  if (isset($this->panes[$pane])) {
    if ($key) {
      return isset($this->panes[$pane][$key]) ? $this->panes[$pane][$key] : NULL;
    }
    else {
      return $this->panes[$pane];
    }
  }
  return NULL;
}