public function Dummy::grantSingleAuthorization in Authorization 8
Grant one individual proposal.
Parameters
\Drupal\user\UserInterface $user: The user to act upon.
mixed $mapping: What to grant.
Overrides ConsumerInterface::grantSingleAuthorization
File
- tests/
modules/ authorization_test/ src/ Plugin/ authorization/ Consumer/ Dummy.php, line 35
Class
- Dummy
- Provides a consumer for Drupal roles.
Namespace
Drupal\authorization_test\Plugin\authorization\ConsumerCode
public function grantSingleAuthorization(UserInterface $user, $mapping) : void {
$user->granted[] = $mapping;
}