You are here

public function BlockEventVariables::getContentChild in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/preprocess_event_dispatcher/src/Variables/BlockEventVariables.php \Drupal\preprocess_event_dispatcher\Variables\BlockEventVariables::getContentChild()

Get the content for a given child.

Parameters

string $childName: Name of the child.

Return value

array Content of the child or [].

File

modules/preprocess_event_dispatcher/src/Variables/BlockEventVariables.php, line 42

Class

BlockEventVariables
Class BlockEventVariables.

Namespace

Drupal\preprocess_event_dispatcher\Variables

Code

public function getContentChild(string $childName) : array {
  return $this->variables['content'][$childName] ?? [];
}