You are here

public function TMGMTI18nStringDefaultSourceUIController::overviewForm in Translation Management Tool 7

Overrides TMGMTDefaultSourceUIController::overviewForm

File

sources/i18n_string/tmgmt_i18n_string.ui.inc, line 40
Provides the I18nString source controller.

Class

TMGMTI18nStringDefaultSourceUIController
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();
  $i18n_strings = tmgmt_i18n_string_get_strings($type, $search_data['label'], $search_data['target_language'], $search_data['target_status']);
  foreach ($this
    ->getTranslationData($i18n_strings, $form_state['item_type']) as $id => $data) {
    $form['items']['#options'][$id] = $this
      ->overviewRow($type, $data);
  }
  $form['pager'] = array(
    '#markup' => theme('pager', array(
      'tags' => NULL,
    )),
  );
  return $form;
}