Builds a table row for overview form.
string $type: i18n type.
array $data: Data needed to build the list row.
array
public function overviewRow($type, $data) {
// Set the default item key, assume it's the first.
$source = $data['object'];
$row = array(
'id' => $data['id'],
'source' => $source->source,
'context' => $source->context,
);
foreach (\Drupal::languageManager()
->getLanguages() as $langcode => $language) {
$build = $this
->buildTranslationStatus($data['translation_statuses'][$langcode], isset($data['current_job_items'][$langcode]) ? $data['current_job_items'][$langcode] : NULL);
$row['langcode-' . $langcode] = \Drupal::service('renderer')
->render($build);
}
return $row;
}