public function BlockEntityStorage::loadFieldBlocks in Field as Block 8.2
Load all blocks provided by this module.
Return value
\Drupal\Core\Entity\EntityInterface[] Block entities.
1 call to BlockEntityStorage::loadFieldBlocks()
- BlockEntityStorage::getEntityTypesUsed in src/
BlockEntityStorage.php - Get all entity type ids that are currently used in Field Blocks.
File
- src/
BlockEntityStorage.php, line 73
Class
- BlockEntityStorage
- Class BlockEntityStorage.
Namespace
Drupal\fieldblockCode
public function loadFieldBlocks() {
// Build a query to fetch the entity IDs.
$entity_query = $this
->getQuery();
$entity_query
->condition('plugin', 'fieldblock:', 'STARTS_WITH');
$result = $entity_query
->execute();
return $result ? $this
->loadMultiple($result) : [];
}