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.php, line 39

Class

BlockRepository
Provides a repository for Block config entities.

Namespace

Drupal\block

Code

public function __construct(EntityManagerInterface $entity_manager, ThemeManagerInterface $theme_manager, ContextHandlerInterface $context_handler) {
  $this->blockStorage = $entity_manager->getStorage('block');
  $this->themeManager = $theme_manager;
  $this->contextHandler = $context_handler;
}
doc_Drupal
2016-10-29 08:47:48
Comments
Leave a Comment

Please login to continue.