You are here

public function TMGMTLocaleSourceUIController::overviewRow in Translation Management Tool 7

Builds a table row for overview form.

Parameters

string $type: i18n type.

array $data: Data needed to build the list row.

Return value

array

1 call to TMGMTLocaleSourceUIController::overviewRow()
TMGMTLocaleSourceUIController::overviewForm in sources/locale/tmgmt_locale.ui.inc
Implements TMGMTSourceUIControllerInterface::overviewForm().

File

sources/locale/tmgmt_locale.ui.inc, line 245
Provides the I18nString source controller.

Class

TMGMTLocaleSourceUIController
Class TMGMTI18nStringDefaultSourceUIController

Code

public function overviewRow($type, $data) {

  // Set the default item key, assume it's the first.
  $source = $data['object'];
  $row = array(
    'id' => $data['id'],
    'source' => check_plain($source->source),
  );
  foreach (language_list() as $langcode => $language) {
    $row['langcode-' . $langcode] = theme('tmgmt_ui_translation_language_status_single', array(
      'translation_status' => $data['translation_statuses'][$langcode],
      'job_item' => isset($data['current_job_items'][$langcode]) ? $data['current_job_items'][$langcode] : NULL,
    ));
  }
  return $row;
}