You are here

public function BusinessRulesItemBase::__construct in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Entity/BusinessRulesItemBase.php \Drupal\business_rules\Entity\BusinessRulesItemBase::__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

3 calls to BusinessRulesItemBase::__construct()
Action::__construct in src/Entity/Action.php
Constructs an Entity object.
Condition::__construct in src/Entity/Condition.php
Constructs an Entity object.
Variable::__construct in src/Entity/Variable.php
Constructs an Entity object.
3 methods override BusinessRulesItemBase::__construct()
Action::__construct in src/Entity/Action.php
Constructs an Entity object.
Condition::__construct in src/Entity/Condition.php
Constructs an Entity object.
Variable::__construct in src/Entity/Variable.php
Constructs an Entity object.

File

src/Entity/BusinessRulesItemBase.php, line 96

Class

BusinessRulesItemBase
Class Item.

Namespace

Drupal\business_rules\Entity

Code

public function __construct(array $values, $entity_type) {
  parent::__construct($values, $entity_type);
  $this->itemManager = $this
    ->getItemManager();
  $this->eventDispatcher = \Drupal::getContainer()
    ->get('event_dispatcher');
  $this->util = \Drupal::getContainer()
    ->get('business_rules.util');
}