public function BlockListController::load

Overrides \Drupal\Core\Config\Entity\ConfigEntityListController::load().

Overrides ConfigEntityListController::load

1 call to BlockListController::load()
BlockListController::buildForm in drupal/core/modules/block/lib/Drupal/block/BlockListController.php
Implements \Drupal\Core\Form\FormInterface::buildForm().

File

drupal/core/modules/block/lib/Drupal/block/BlockListController.php, line 36
Contains \Drupal\block\BlockListController.

Class

BlockListController
Defines the block list controller.

Namespace

Drupal\block

Code

public function load() {

  // If no theme was specified, use the current theme.
  if (!$this->theme) {
    $this->theme = $GLOBALS['theme'];
  }

  // Store the region list.
  $this->regions = system_region_list($this->theme, REGIONS_VISIBLE);

  // Load only blocks for this theme, and sort them.
  // @todo Move the functionality of _block_rehash() out of the listing page.
  $entities = _block_rehash($this->theme);
  uasort($entities, 'static::sort');
  return $entities;
}