You are here

public function JobItem::getSourceLabel in Translation Management Tool 8

Retrieves the label of the source object via the source controller.

Return value

string The label of the source object.

Overrides JobItemInterface::getSourceLabel

5 calls to JobItem::getSourceLabel()
JobItem::accepted in src/Entity/JobItem.php
Sets the state of the job item to 'accepted'.
JobItem::active in src/Entity/JobItem.php
Sets the state of the job item to 'active'.
JobItem::addTranslatedData in src/Entity/JobItem.php
Adds translated data to a job item.
JobItem::label in src/Entity/JobItem.php
Gets the label of the entity.
JobItem::needsReview in src/Entity/JobItem.php
Sets the state of the job item to 'needs review'.

File

src/Entity/JobItem.php, line 307

Class

JobItem
Entity class for the tmgmt_job_item entity.

Namespace

Drupal\tmgmt\Entity

Code

public function getSourceLabel() {
  if ($plugin = $this
    ->getSourcePlugin()) {
    return (string) $plugin
      ->getLabel($this);
  }
  return FALSE;
}