You are here

public function UserSectionStorageInterface::getUserSections in Workbench Access 8

Gets the editorial sections assigned to a user.

Parameters

\Drupal\workbench_access\Entity\AccessSchemeInterface $scheme: Access scheme.

\Drupal\Core\Session\AccountInterface $account: An optional user. If not provided, the active user is returned.

bool $add_roles: Whether to add the role-based assignments to the user. Defaults to true.

Return value

array An array of section ids that the user is assigned to.

1 method overrides UserSectionStorageInterface::getUserSections()
UserSectionStorage::getUserSections in src/UserSectionStorage.php
Gets the editorial sections assigned to a user.

File

src/UserSectionStorageInterface.php, line 95

Class

UserSectionStorageInterface
Defines an interface for storing and retrieving sections for a user.

Namespace

Drupal\workbench_access

Code

public function getUserSections(AccessSchemeInterface $scheme, AccountInterface $account = NULL, $add_roles = TRUE);