You are here

public function NullSegmenter::getSegmentedData in Translation Management Tool 8

Add the segmented data tag to the data or update it.

Will just segment an item if it has the key '#translate' set to TRUE.

Parameters

array $data: The data array of a JobItem. Example: [ '#text' => 'Unsegmented source text', '#translate' => TRUE, ]

Return value

array An array with the the segments. Example: [ '#text' => 'Unsegmented source text', '#translate' => TRUE, '#segmented_text' => '<tmgmt-segment>Segmented source text</tmgmt-segment>' ]

Overrides SegmenterInterface::getSegmentedData

File

src/NullSegmenter.php, line 29

Class

NullSegmenter
Null implementation for the SegmenterInterface.

Namespace

Drupal\tmgmt

Code

public function getSegmentedData($data) {
  return $data;
}