public function JobItem::getSourceData

Loads the structured source data array from the source.

Overrides JobItemInterface::getSourceData

2 calls to JobItem::getSourceData()
JobItem::getData in src/Entity/JobItem.php
Array of the data to be translated.
JobItem::recalculateStatistics in src/Entity/JobItem.php
Recalculate statistical word-data: pending, translated, reviewed, accepted.

File

src/Entity/JobItem.php, line 401

Class

JobItem
Entity class for the tmgmt_job_item entity.

Namespace

Drupal\tmgmt\Entity

Code

public function getSourceData() {
  if ($plugin = $this
    ->getSourcePlugin()) {
    $data = $plugin
      ->getData($this);

    /** @var \Drupal\tmgmt\SegmenterInterface $segmenter */
    $segmenter = \Drupal::service('tmgmt.segmenter');
    return $segmenter
      ->getSegmentedData($data);
  }
  return array();
}