You are here

public static function LingotekEntity::load in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.5 lib/Drupal/lingotek/LingotekEntity.php \LingotekEntity::load()
  2. 7.6 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.

7 calls to LingotekEntity::load()
LingotekEntity::loadByLingotekDocumentId in lib/Drupal/lingotek/LingotekEntity.php
Loads a LingotekNode by Lingotek Document ID.
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().

... See full list

File

lib/Drupal/lingotek/LingotekEntity.php, line 83
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;
}