You are here

public function LingotekProfile::__construct in Lingotek Translation 3.8.x

Same name and namespace in other branches
  1. 8.2 src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__construct()
  2. 4.0.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__construct()
  3. 3.0.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__construct()
  4. 3.1.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__construct()
  5. 3.2.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__construct()
  6. 3.3.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__construct()
  7. 3.4.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__construct()
  8. 3.5.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__construct()
  9. 3.6.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__construct()
  10. 3.7.x src/Entity/LingotekProfile.php \Drupal\lingotek\Entity\LingotekProfile::__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/LingotekProfile.php, line 203

Class

LingotekProfile
Defines the LingotekProfile entity.

Namespace

Drupal\lingotek\Entity

Code

public function __construct(array $values, $entity_type) {
  if (isset($values['intelligence_metadata']) && is_array($values['intelligence_metadata'])) {
    $values['intelligence_metadata'] += $this->intelligence_metadata;
  }
  return parent::__construct($values, $entity_type);
}