ConnectionPermissionBase.php in RedHen CRM 8
File
modules/redhen_connection/src/Plugin/ConnectionPermissionBase.php
View source
<?php
namespace Drupal\redhen_connection\Plugin;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\Entity\EntityInterface;
use Drupal\redhen_contact\Entity\Contact;
class ConnectionPermissionBase extends PluginBase implements ConnectionPermissionInterface {
public $redhenConnectionConnections;
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->redhenConnectionConnections = \Drupal::service('redhen_connection.connections');
}
public function getPermissionKey() {
return $this
->get('subject_entity_type') . ($this
->get('subject_entity_bundle') ? ".{$this->get('subject_entity_bundle')}" : "");
}
public function getInfluencers(EntityInterface $subject_entity) {
}
public function hasRolePermissions(EntityInterface $subject_entity, $operation, Contact $contact) {
}
public function get($value) {
return $this->pluginDefinition[$value];
}
}