function BlockController::getVisibleRegionNames

Same name and namespace in other branches
  1. 11.x core/modules/block/src/Controller/BlockController.php \Drupal\block\Controller\BlockController::getVisibleRegionNames()
  2. 10 core/modules/block/src/Controller/BlockController.php \Drupal\block\Controller\BlockController::getVisibleRegionNames()
  3. 9 core/modules/block/src/Controller/BlockController.php \Drupal\block\Controller\BlockController::getVisibleRegionNames()
  4. 8.9.x core/modules/block/src/Controller/BlockController.php \Drupal\block\Controller\BlockController::getVisibleRegionNames()

Returns the human-readable list of regions keyed by machine name.

Parameters

string $theme: The name of the theme.

Return value

array An array of human-readable region names keyed by machine name.

Deprecated

in drupal:11.4.0 and is removed from drupal:12.0.0. Use $this->themeHandler->getTheme()->listVisibleRegions() instead.

See also

https://www.drupal.org/node/3015925

File

core/modules/block/src/Controller/BlockController.php, line 114

Class

BlockController
Controller routines for admin block routes.

Namespace

Drupal\block\Controller

Code

protected function getVisibleRegionNames($theme) {
  @trigger_error(__CLASS__ . '::getVisibleRegionNames() is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. Use $this->themeHandler->getTheme()->listVisibleRegions() instead. See https://www.drupal.org/node/3015925', E_USER_DEPRECATED);
  return $this->themeHandler
    ->getTheme($theme)
    ->listVisibleRegions();
}

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