public function JobItem::getJob

Loads the job entity that this job item is attached to.

Return value

\Drupal\tmgmt\JobInterface The job entity that this job item is attached to or NULL if there is no job.

Overrides JobItemInterface::getJob

5 calls to JobItem::getJob()
JobItem::abortTranslation in src/Entity/JobItem.php
Attempts to abort the translation job item.
JobItem::accepted in src/Entity/JobItem.php
Sets the state of the job item to 'accepted'.
JobItem::getTranslatorPlugin in src/Entity/JobItem.php
Returns the translator plugin of the translator of this job item.
JobItem::hasTranslator in src/Entity/JobItem.php
Checks if the translator exists.
JobItem::invalidateTagsOnSave in src/Entity/JobItem.php

File

src/Entity/JobItem.php, line 345

Class

JobItem
Entity class for the tmgmt_job_item entity.

Namespace

Drupal\tmgmt\Entity

Code

public function getJob() {
  return Job::load($this
    ->get('tjid')->target_id);
}