You are here

public function RoleSectionStorage::__construct in Workbench Access 8

Constructs a new RoleSectionStorage object.

Parameters

\Drupal\Core\State\StateInterface $state: State service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: Entity type manager.

File

src/RoleSectionStorage.php, line 40

Class

RoleSectionStorage
Defines a role-section storage that uses the State API.

Namespace

Drupal\workbench_access

Code

public function __construct(StateInterface $state, EntityTypeManagerInterface $entityTypeManager) {
  $this->state = $state;
  $this->entityTypeManager = $entityTypeManager;
  $this->roleStorage = $entityTypeManager
    ->getStorage('user_role');
}