Skip to content
Snippets Groups Projects
Select Git revision
  • 11.x
  • 10.5.x protected
  • 10.6.x protected
  • 11.2.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.2 protected
  • 11.2.3 protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
40 results

BlockRepositoryInterface.php

Blame
  • nod_'s avatar
    Issue #3498302 by quietone, borisson_: Fix 'Drupal.Commenting.ClassComment.Missing' in modules
    Théodore Biadala authored
    e1876584
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    BlockRepositoryInterface.php 1.24 KiB
    <?php
    
    namespace Drupal\block;
    
    /**
     * Provides an interface for the block repository.
     */
    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 = []);
    
      /**
       * Based on a suggested string generates a unique machine name for a block.
       *
       * @param string $suggestion
       *   The suggested block ID.
       * @param string $theme
       *   The machine name of the theme.
       *
       * @return string
       *   Returns the unique name.
       */
      public function getUniqueMachineName(string $suggestion, string $theme): string;
    
    }