class ConnectionPermissionBase in RedHen CRM 8
Base class for Connection permission plugins.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\redhen_connection\Plugin\ConnectionPermissionBase implements ConnectionPermissionInterface
Expanded class hierarchy of ConnectionPermissionBase
3 files declare their use of ConnectionPermissionBase
- ConnectionConnectionPermission.php in modules/
redhen_connection/ src/ Plugin/ ConnectionPermission/ ConnectionConnectionPermission.php - OrgConnectionPermission.php in modules/
redhen_connection/ src/ Plugin/ ConnectionPermission/ OrgConnectionPermission.php - SecondaryContactConnectionPermission.php in modules/
redhen_connection/ src/ Plugin/ ConnectionPermission/ SecondaryContactConnectionPermission.php
File
- modules/
redhen_connection/ src/ Plugin/ ConnectionPermissionBase.php, line 12
Namespace
Drupal\redhen_connection\PluginView source
class ConnectionPermissionBase extends PluginBase implements ConnectionPermissionInterface {
/**
* Connection Service.
*
* @var \Drupal\redhen_connection\ConnectionService
*/
public $redhenConnectionConnections;
/**
* {@inheritDoc}
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->redhenConnectionConnections = \Drupal::service('redhen_connection.connections');
}
/**
* {@inheritDoc}
*/
public function getPermissionKey() {
return $this
->get('subject_entity_type') . ($this
->get('subject_entity_bundle') ? ".{$this->get('subject_entity_bundle')}" : "");
}
/**
* {@inheritDoc}
*/
public function getInfluencers(EntityInterface $subject_entity) {
}
/**
* {@inheritDoc}
*/
public function hasRolePermissions(EntityInterface $subject_entity, $operation, Contact $contact) {
}
/**
* Get values from plugin definition.
*
* @param string $value
* The plugin definition key to check for.
*
* @return string
* The definition.
*/
public function get($value) {
return $this->pluginDefinition[$value];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConnectionPermissionBase:: |
public | property | Connection Service. | |
ConnectionPermissionBase:: |
public | function | Get values from plugin definition. | |
ConnectionPermissionBase:: |
public | function |
Get the influencer entity. Overrides ConnectionPermissionInterface:: |
2 |
ConnectionPermissionBase:: |
public | function |
Get the entity key. Overrides ConnectionPermissionInterface:: |
3 |
ConnectionPermissionBase:: |
public | function |
Determine if the contact execute the operation on the subject entity. Overrides ConnectionPermissionInterface:: |
3 |
ConnectionPermissionBase:: |
public | function |
Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. |