public function JobItem::getSourceType

Returns the user readable type of job item.

Overrides JobItemInterface::getSourceType

File

src/Entity/JobItem.php, line 335

Class

JobItem
Entity class for the tmgmt_job_item entity.

Namespace

Drupal\tmgmt\Entity

Code

public function getSourceType() {
  if ($plugin = $this
    ->getSourcePlugin()) {
    return $plugin
      ->getType($this);
  }
  return ucfirst($this
    ->get('item_type')->value);
}