You are here

private function LingotekEntity::__construct in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekEntity.php \LingotekEntity::__construct()
  2. 7.6 lib/Drupal/lingotek/LingotekEntity.php \LingotekEntity::__construct()

Constructor.

This is private since we want consumers to instantiate via the factory methods.

Parameters

object $node: A Drupal node.

File

lib/Drupal/lingotek/LingotekEntity.php, line 46
Defines LingotekEntity.

Class

LingotekEntity
A class wrapper for Lingotek-specific behavior on nodes.

Code

private function __construct($entity, $entity_type) {
  $this->entity = $entity;
  $this->language = $entity->language;
  $this->language_targets = Lingotek::getLanguagesWithoutSource($this->language);
  $this->entity_type = $entity_type;
  $this->info = entity_get_info($this->entity_type);
}