BlockViewBuilder::lazyBuilder

public static BlockViewBuilder::lazyBuilder($entity_id, $view_mode) #lazy_builder callback; builds a #pre_render-able block. Parameters $entity_id: A block config entity ID. $view_mode: The view mode the block is being viewed in. Return value array A render array with a #pre_render callback to render the block. File core/modules/block/src/BlockViewBuilder.php, line 189 Class BlockViewBuilder Provides a Block view builder. Namespace Drupal\block Code public static function lazyBuilder

BlockViewBuilder::createInstance

public static BlockViewBuilder::createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) Instantiates a new instance of this entity handler. This is a factory method that returns a new instance of this object. The factory should pass any needed dependencies into the constructor of this object, but not the container itself. Every call to this method must return a new instance of this object; that is, it may not implement a singleton. Parameters \Symfony\Component\Dependen

BlockViewBuilder::buildPreRenderableBlock

protected static BlockViewBuilder::buildPreRenderableBlock($entity, ModuleHandlerInterface $module_handler) Builds a #pre_render-able block render array. Parameters \Drupal\block\BlockInterface $entity: A block config entity. \Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service. Return value array A render array with a #pre_render callback to render the block. File core/modules/block/src/BlockViewBuilder.php, line 134 Class BlockViewBuilder Provides a

BlockViewBuilder::buildComponents

public BlockViewBuilder::buildComponents(array &$build, array $entities, array $displays, $view_mode) Builds the component fields and properties of a set of entities. Parameters &$build: The renderable array representing the entity content. \Drupal\Core\Entity\EntityInterface[] $entities: The entities whose content is being built. \Drupal\Core\Entity\Display\EntityViewDisplayInterface[] $displays: The array of entity view displays holding the display options configured for the entity c

BlockViewBuilder::$moduleHandler

The module handler. Type: \Drupal\Core\Extension\ModuleHandlerInterface Overrides EntityHandlerBase::$moduleHandler File core/modules/block/src/BlockViewBuilder.php, line 30 Class BlockViewBuilder Provides a Block view builder. Namespace Drupal\block Code protected $moduleHandler;

BlockViewBuilder

Provides a Block view builder. Hierarchy class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityViewBuilder implements EntityHandlerInterface, EntityViewBuilderInterfaceclass \Drupal\block\BlockViewBuilder File core/modules/block/src/BlockViewBuilder.php, line 23 Namespace Drupal\block Members Name Modifiers Type Description BlockViewBuilder::$moduleHandler protected property The module handl

BlockRepositoryInterface::getVisibleBlocksPerRegion

public BlockRepositoryInterface::getVisibleBlocksPerRegion(array &$cacheable_metadata = []) Returns an array of regions and their block entities. Parameters \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 value array The array is first keyed by region machine name, with the values containing an array keyed by block ID, with block e

BlockRepositoryInterface

Hierarchy interface \Drupal\block\BlockRepositoryInterface File core/modules/block/src/BlockRepositoryInterface.php, line 5 Namespace Drupal\block Members Name Modifiers Type Description BlockRepositoryInterface::getVisibleBlocksPerRegion public function Returns an array of regions and their block entities.

BlockRepository::__construct

public BlockRepository::__construct(EntityManagerInterface $entity_manager, ThemeManagerInterface $theme_manager, ContextHandlerInterface $context_handler) Constructs a new BlockRepository. Parameters \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager. \Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager. \Drupal\Core\Plugin\Context\ContextHandlerInterface $context_handler: The plugin context handler. File core/modules/block/src/BlockRepository

BlockRepository::getVisibleBlocksPerRegion

public BlockRepository::getVisibleBlocksPerRegion(array &$cacheable_metadata = []) Returns an array of regions and their block entities. Parameters \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 value array The array is first keyed by region machine name, with the values containing an array keyed by block ID, with block entities a