public function Display::getSortedBlocksByRegion in Layout 8.2
Implements BoundDisplayInterface::getSortedBlocksByRegion().
Throws
\Exception
Overrides BoundDisplayInterface::getSortedBlocksByRegion
File
- lib/
Drupal/ layout/ Entity/ Display.php, line 78  - Definition of Drupal\layout\Entity\Display.
 
Class
- Display
 - Defines the display entity.
 
Namespace
Drupal\layout\EntityCode
public function getSortedBlocksByRegion($region) {
  if ($this->blocksInRegions === NULL) {
    $this
      ->sortBlocks();
  }
  if (!isset($this->blocksInRegions[$region])) {
    throw new \Exception(sprintf("Region %region does not exist in layout %layout", array(
      '%region' => $region,
      '%layout' => $this
        ->getLayoutInstance()->name,
    )), E_RECOVERABLE_ERROR);
  }
  return $this->blocksInRegions[$region];
}