You are here

public function TMGMTLocaleSourceUIController::overviewForm in Translation Management Tool 7

Implements TMGMTSourceUIControllerInterface::overviewForm().

Overrides TMGMTDefaultSourceUIController::overviewForm

File

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

Class

TMGMTLocaleSourceUIController
Class TMGMTI18nStringDefaultSourceUIController

Code

public function overviewForm($form, &$form_state, $type) {
  $form += $this
    ->overviewSearchFormPart($form, $form_state, $type);
  $form['items'] = array(
    '#type' => 'tableselect',
    '#header' => $this
      ->overviewFormHeader($type),
    '#empty' => t('No strings matching given criteria have been found.'),
  );
  $search_data = $this
    ->getSearchFormSubmittedParams();
  $strings = $this
    ->getStrings($type, $search_data['label'], $search_data['missing_target_language']);
  foreach ($this
    ->getTranslationData($strings, $type) as $id => $data) {
    $form['items']['#options'][$id] = $this
      ->overviewRow($type, $data);
  }
  $form['pager'] = array(
    '#markup' => theme('pager', array(
      'tags' => NULL,
    )),
  );
  return $form;
}