You are here

protected function TMGMTLocalTaskItem::defaultLabel in Translation Management Tool 7

Defines the entity label if the 'entity_class_label' callback is used.

Specify 'entity_class_label' as 'label callback' in hook_entity_info() to let the entity label point to this method. Override this in order to implement a custom default label.

Overrides Entity::defaultLabel

File

translators/tmgmt_local/entity/tmgmt_local.entity.task_item.inc, line 88

Class

TMGMTLocalTaskItem
Entity class for the local task item entity.

Code

protected function defaultLabel() {
  if ($job_item = $this
    ->getJobItem()) {
    return $job_item
      ->label();
  }
  return t('Missing job item');
}