public function BlockStorageController::load

Implements Drupal\Core\Entity\EntityStorageControllerInterface::load().

Overrides ConfigStorageController::load

File

drupal/core/modules/block/lib/Drupal/block/BlockStorageController.php, line 21
Contains \Drupal\block\BlockStorageController.

Class

BlockStorageController
Defines the storage controller class for Block entities.

Namespace

Drupal\block

Code

public function load(array $ids = NULL) {
  $entities = parent::load($ids);

  // Only blocks with a valid plugin should be loaded.
  return array_filter($entities, function ($entity) {
    return $entity
      ->getPlugin();
  });
}