protected function ContentEntitySource::getEntity

Returns the entity for the given job item.

Parameters

\Drupal\tmgmt\JobItemInterface $job_item: The job entity

Return value

\Drupal\Core\Entity\ContentEntityInterface The entity.

4 calls to ContentEntitySource::getEntity()
ContentEntitySource::getExistingLangCodes in sources/content/src/Plugin/tmgmt/Source/ContentEntitySource.php
Gets existing translation language codes of the job item source.
ContentEntitySource::getSourceLangCode in sources/content/src/Plugin/tmgmt/Source/ContentEntitySource.php
Gets language code of the job item source.
ContentEntitySource::getType in sources/content/src/Plugin/tmgmt/Source/ContentEntitySource.php
Returns the type of a job item.
ContentEntitySource::saveTranslation in sources/content/src/Plugin/tmgmt/Source/ContentEntitySource.php
Saves a translation.

File

sources/content/src/Plugin/tmgmt/Source/ContentEntitySource.php, line 49

Class

ContentEntitySource
Content entity source plugin controller.

Namespace

Drupal\tmgmt_content\Plugin\tmgmt\Source

Code

protected function getEntity(JobItemInterface $job_item) {
  return \Drupal::entityTypeManager()
    ->getStorage($job_item
    ->getItemType())
    ->load($job_item
    ->getItemId());
}