You are here

public static function LingotekSync::getWorkflowIdFromEntityId in Lingotek Translation 7.7

1 call to LingotekSync::getWorkflowIdFromEntityId()
lingotek_get_change_workflow_form in ./lingotek.module

File

lib/Drupal/lingotek/LingotekSync.php, line 1048
LingotekSync

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getWorkflowIdFromEntityId($id) {
  $query = db_select('lingotek_entity_metadata', 'lem');
  $query
    ->addField('lem', 'value');
  $query
    ->condition('entity_key', 'workflow_id', '=');
  $query
    ->condition('entity_id', $id, '=');
  $result = $query
    ->execute()
    ->fetchCol();
  return $result[0];
}