You are here

public static function LingotekEntity::load in Lingotek Translation 7.6

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

Factory method for getting a loaded LingotekEntity object

Parameters

object $entity: A Drupal entity.

Return value

LingotekEntity A loaded LingotekEntity object.

6 calls to LingotekEntity::load()
lingotek_advanced_parsing_update_node in ./lingotek.module
Processing callback for the advanced parsing update batch operation.
lingotek_advanced_parsing_upgrade_form_submit in ./lingotek.page.inc
Submit handler for the lingotek_advanced_parsing_upgrade_form form.
lingotek_entity_upload in ./lingotek.module
lingotek_form_node_form_alter in ./lingotek.module
Implements hook_form_BASE_FORM_ID_alter().
lingotek_get_trans_obj in ./lingotek.sync.inc

... See full list

File

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

Class

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

Code

public static function load($entity, $entity_type) {
  $entity = new LingotekEntity($entity, $entity_type);
  $entity
    ->setApi(LingotekApi::instance());
  return $entity;
}