function Theme::listAllRegions

Same name and namespace in other branches
  1. main core/lib/Drupal/Core/Extension/Theme.php \Drupal\Core\Extension\Theme::listAllRegions()

Lists all the theme's regions.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup[] An array of human-readable region names keyed by machine names.

1 call to Theme::listAllRegions()
Theme::listVisibleRegions in core/lib/Drupal/Core/Extension/Theme.php
Lists all the theme's visible regions.

File

core/lib/Drupal/Core/Extension/Theme.php, line 47

Class

Theme
The Theme extension object.

Namespace

Drupal\Core\Extension

Code

public function listAllRegions() : array {
  return array_map(static function ($label) {
    // phpcs:ignore Drupal.Semantics.FunctionT.NotLiteralString
    return new TranslatableMarkup($label);
  }, $this->info['regions']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.