You are here

public function TMGMTEntitySourcePluginController::getLabel in Translation Management Tool 7

Return a title for this job item.

Parameters

TMGMTJobItem $job_item: The job item entity.

Overrides TMGMTDefaultSourcePluginController::getLabel

File

sources/entity/tmgmt_entity.plugin.inc, line 10
Provides the Entity source controller.

Class

TMGMTEntitySourcePluginController
@file Provides the Entity source controller.

Code

public function getLabel(TMGMTJobItem $job_item) {
  if ($entity = entity_load_single($job_item->item_type, $job_item->item_id)) {
    return entity_label($job_item->item_type, $entity);
  }
}