You are here

public function UserSectionStorageInterface::addUser in Workbench Access 8

Adds a set of sections to a user.

Parameters

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

\Drupal\Core\Session\AccountInterface $account: User to add to the section.

array $sections: An array of section ids to assign to this user.

Return value

\Drupal\Core\Session\AccountInterface The saved user entity.

1 method overrides UserSectionStorageInterface::addUser()
UserSectionStorage::addUser in src/UserSectionStorage.php
Adds a set of sections to a user.

File

src/UserSectionStorageInterface.php, line 26

Class

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

Namespace

Drupal\workbench_access

Code

public function addUser(AccessSchemeInterface $scheme, AccountInterface $account, array $sections = []);