You are here

public function BusinessRule::__construct in Business Rules 2.x

Same name and namespace in other branches
  1. 8 src/Entity/BusinessRule.php \Drupal\business_rules\Entity\BusinessRule::__construct()

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/BusinessRule.php, line 158

Class

BusinessRule
Defines the Rule entity.

Namespace

Drupal\business_rules\Entity

Code

public function __construct(array $values, $entity_type = 'business_rule') {
  parent::__construct($values, $entity_type);
  $this->util = \Drupal::getContainer()
    ->get('business_rules.util');
  $this->configFactory = \Drupal::getContainer()
    ->get('config.factory');
  self::$reactsOnManager = \Drupal::getContainer()
    ->get('plugin.manager.business_rules.reacts_on');
}