You are here

public function MultipleStaticContext::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php \Drupal\block_test\ContextProvider\MultipleStaticContext::__construct()

Constructs a new MultipleStaticContext.

Parameters

\Drupal\Core\Session\AccountInterface $account: The current user.

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.

File

core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php, line 44
Contains \Drupal\block_test\ContextProvider\MultipleStaticContext.

Class

MultipleStaticContext
Sets multiple contexts for a static value.

Namespace

Drupal\block_test\ContextProvider

Code

public function __construct(AccountInterface $account, EntityManagerInterface $entity_manager) {
  $this->account = $account;
  $this->userStorage = $entity_manager
    ->getStorage('user');
}