Dummy.php in Authorization 8
File
tests/modules/authorization_test/src/Plugin/authorization/Consumer/Dummy.php
View source
<?php
declare (strict_types=1);
namespace Drupal\authorization_test\Plugin\authorization\Consumer;
use Drupal\authorization\Consumer\ConsumerPluginBase;
use Drupal\user\UserInterface;
class Dummy extends ConsumerPluginBase {
protected $allowConsumerTargetCreation = TRUE;
public function revokeGrants(UserInterface $user, array $context) : void {
$user->revoked = $context;
}
public function grantSingleAuthorization(UserInterface $user, $mapping) : void {
$user->granted[] = $mapping;
}
public function createConsumerTarget(string $mapping) : void {
}
}
Classes
Name |
Description |
Dummy |
Provides a consumer for Drupal roles. |