3 namespace Drupal\block;
5 interface BlockRepositoryInterface {
8 * Return only visible regions.
10 * @see system_region_list()
12 const REGIONS_VISIBLE = 'visible';
17 * @see system_region_list()
19 const REGIONS_ALL = 'all';
22 * Returns an array of regions and their block entities.
24 * @param \Drupal\Core\Cache\CacheableMetadata[] $cacheable_metadata
25 * (optional) List of CacheableMetadata objects, keyed by region. This is
26 * by reference and is used to pass this information back to the caller.
29 * The array is first keyed by region machine name, with the values
30 * containing an array keyed by block ID, with block entities as the values.
32 public function getVisibleBlocksPerRegion(array &$cacheable_metadata = []);