public function AuthorizationProfile::__construct in Authorization 8
Constructs an Entity object.
Parameters
array $values: An array of values to set, keyed by property name. If the entity type has bundles, the bundle key has to be specified.
string $entity_type: The type of the entity to create.
Overrides ConfigEntityBase::__construct
File
- src/
Entity/ AuthorizationProfile.php, line 165
Class
- AuthorizationProfile
- Defines the Authorization profile entity.
Namespace
Drupal\authorization\EntityCode
public function __construct($values, $entity_type) {
parent::__construct($values, $entity_type);
// Cannot inject those without moving the logic to a controller class, (see
// https://www.drupal.org/node/2913224).
$this->provider_plugin_manager = \Drupal::service('plugin.manager.authorization.provider');
$this->consumer_plugin_manager = \Drupal::service('plugin.manager.authorization.consumer');
$this->logger = \Drupal::service('logger.channel.authorization');
}