public function CustomBlock::getInstances

Gets the configured instances of this custom block.

Return value

array Array of Drupal\block\Core\Plugin\Entity\Block entities.

Overrides CustomBlockInterface::getInstances

1 call to CustomBlock::getInstances()
CustomBlock::delete in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlock.php
Implements \Drupal\Core\Entity\EntityInterface::delete().

File

drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlock.php, line 187
Contains \Drupal\custom_block\Plugin\Core\Entity\CustomBlock.

Class

CustomBlock
Defines the custom block entity class.

Namespace

Drupal\custom_block\Plugin\Core\Entity

Code

public function getInstances() {
  return entity_load_multiple_by_properties('block', array(
    'plugin' => 'custom_block:' . $this->uuid->value,
  ));
}