interface ConsumerInterface in Authorization 8
Defines an interface for Authorization consumer plugins.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\DerivativeInspectionInterface; interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Component\Plugin\DependentPluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Core\Plugin\ContainerFactoryPluginInterface
- interface \Drupal\authorization\Plugin\ConfigurableAuthorizationPluginInterface
- interface \Drupal\authorization\Consumer\ConsumerInterface
- interface \Drupal\authorization\Plugin\ConfigurableAuthorizationPluginInterface
Expanded class hierarchy of ConsumerInterface
All classes that implement ConsumerInterface
File
- src/
Consumer/ ConsumerInterface.php, line 13
Namespace
Drupal\authorization\ConsumerView source
interface ConsumerInterface extends ConfigurableAuthorizationPluginInterface {
/**
* Revoke all previously applied and no longer valid grants.
*
* @param \Drupal\user\UserInterface $user
* The user to act upon.
* @param array $context
* Grants applied during this procedure.
*/
public function revokeGrants(UserInterface $user, array $context) : void;
/**
* Grant one individual proposal.
*
* @param \Drupal\user\UserInterface $user
* The user to act upon.
* @param mixed $mapping
* What to grant.
*/
public function grantSingleAuthorization(UserInterface $user, $mapping) : void;
/**
* Are we allowed to create things.
*
* Note that this only enables the *option* for users to choose this in the
* consumer configuration of the profile.
*
* @return bool
* Whether the consumer provides creating targets.
*/
public function consumerTargetCreationAllowed() : bool;
/**
* Create authorization consumer targets.
*
* @param string $mapping
* What grant to create.
*/
public function createConsumerTarget(string $mapping) : void;
/**
* Consumer-side filtering.
*
* @param array $proposals
* Proposals left over after provider filtering.
* @param array $mapping
* What the proposals should be mapped against in the consumer.
*
* @return array
* Remaining, valid proposals.
*/
public function filterProposals(array $proposals, array $mapping) : array;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableAuthorizationPluginInterface:: |
public | function | Builds the authorization row description. | 1 |
ConfigurableAuthorizationPluginInterface:: |
public | function | Builds the authorization form row. | 1 |
ConfigurableAuthorizationPluginInterface:: |
public | function | Returns the plugin's description. | 1 |
ConfigurableAuthorizationPluginInterface:: |
public | function | Tokens for the relevant plugin. | 1 |
ConfigurableAuthorizationPluginInterface:: |
public | function | Returns the label for use on the administration pages. | 1 |
ConfigurableAuthorizationPluginInterface:: |
public | function | Submits the authorization form row. | 1 |
ConfigurableAuthorizationPluginInterface:: |
public | function | Validates the authorization form row. | 1 |
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
ConsumerInterface:: |
public | function | Are we allowed to create things. | 1 |
ConsumerInterface:: |
public | function | Create authorization consumer targets. | 2 |
ConsumerInterface:: |
public | function | Consumer-side filtering. | 1 |
ConsumerInterface:: |
public | function | Grant one individual proposal. | 2 |
ConsumerInterface:: |
public | function | Revoke all previously applied and no longer valid grants. | 2 |
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 112 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |