interface BlockRepositoryInterface in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block/src/BlockRepositoryInterface.php \Drupal\block\BlockRepositoryInterface
Hierarchy
- interface \Drupal\block\BlockRepositoryInterface
Expanded class hierarchy of BlockRepositoryInterface
All classes that implement BlockRepositoryInterface
1 file declares its use of BlockRepositoryInterface
- BlockPageVariant.php in core/
modules/ block/ src/ Plugin/ DisplayVariant/ BlockPageVariant.php
File
- core/
modules/ block/ src/ BlockRepositoryInterface.php, line 5
Namespace
Drupal\blockView source
interface BlockRepositoryInterface {
/**
* Return only visible regions.
*
* @see system_region_list()
*/
const REGIONS_VISIBLE = 'visible';
/**
* Return all regions.
*
* @see system_region_list()
*/
const REGIONS_ALL = 'all';
/**
* Returns an array of regions and their block entities.
*
* @param \Drupal\Core\Cache\CacheableMetadata[] $cacheable_metadata
* (optional) List of CacheableMetadata objects, keyed by region. This is
* by reference and is used to pass this information back to the caller.
*
* @return array
* The array is first keyed by region machine name, with the values
* containing an array keyed by block ID, with block entities as the values.
*/
public function getVisibleBlocksPerRegion(array &$cacheable_metadata = []);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlockRepositoryInterface:: |
public | function | Returns an array of regions and their block entities. | 1 |
BlockRepositoryInterface:: |
constant | Return all regions. | ||
BlockRepositoryInterface:: |
constant | Return only visible regions. |