You are here

class OrgConnectionPermission in RedHen CRM 8

Provides permission for access to connected redhen_orgs.

Plugin annotation


@ConnectionPermission(
 id = "org_connection_permission",
 label = @Translation("Organization"),
 description = @Translation("Sitewide permissions will override this setting."),
 subject_entity_type = "redhen_org",
 subject_entity_bundle = "",
 influencer_entity_type = "",
)

Hierarchy

Expanded class hierarchy of OrgConnectionPermission

File

modules/redhen_connection/src/Plugin/ConnectionPermission/OrgConnectionPermission.php, line 22

Namespace

Drupal\redhen_connection\Plugin\ConnectionPermission
View source
class OrgConnectionPermission extends ConnectionPermissionBase implements ConnectionPermissionInterface {

  /**
   * {@inheritDoc}
   */
  public function getPermissionKey() {
    return 'entity';
  }

  /**
   * {@inheritdoc}
   */
  public function hasRolePermissions(EntityInterface $subject_entity, $operation, Contact $contact) {
    return $this->redhenConnectionConnections
      ->checkConnectionPermission($contact, $subject_entity, $operation, $this
      ->getPermissionKey());
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConnectionPermissionBase::$redhenConnectionConnections public property Connection Service.
ConnectionPermissionBase::get public function Get values from plugin definition.
ConnectionPermissionBase::getInfluencers public function Get the influencer entity. Overrides ConnectionPermissionInterface::getInfluencers 2
ConnectionPermissionBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. Overrides PluginBase::__construct
OrgConnectionPermission::getPermissionKey public function Get the entity key. Overrides ConnectionPermissionBase::getPermissionKey
OrgConnectionPermission::hasRolePermissions public function Determine if the contact execute the operation on the subject entity. Overrides ConnectionPermissionBase::hasRolePermissions
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.