function MultipleStaticContext::__construct
Same name in other branches
- 8.9.x core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php \Drupal\block_test\ContextProvider\MultipleStaticContext::__construct()
- 10 core/modules/block/tests/modules/block_test/src/ContextProvider/MultipleStaticContext.php \Drupal\block_test\ContextProvider\MultipleStaticContext::__construct()
- 11.x 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\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
File
-
core/
modules/ block/ tests/ modules/ block_test/ src/ ContextProvider/ MultipleStaticContext.php, line 38
Class
- MultipleStaticContext
- Sets multiple contexts for a static value.
Namespace
Drupal\block_test\ContextProviderCode
public function __construct(AccountInterface $account, EntityTypeManagerInterface $entity_type_manager) {
$this->account = $account;
$this->userStorage = $entity_type_manager->getStorage('user');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.