public function JobItem::getSourceLabel

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
JobItem::needsReview in src/Entity/JobItem.php
Sets the state of the job item to 'needs review'.

File

src/Entity/JobItem.php, line 314

Class

JobItem
Entity class for the tmgmt_job_item entity.

Namespace

Drupal\tmgmt\Entity

Code

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