public function TMGMTTranslatorUIController::overviewForm in Translation Management Tool 7
Builds the entity overview form.
Overrides EntityDefaultUIController::overviewForm
File
- ui/
includes/ tmgmt_ui.controller.translator.inc, line 32 - Contains the translator UI controller.
Class
- TMGMTTranslatorUIController
- Entity UI controller for the Translator Entity.
Code
public function overviewForm($form, &$form_state) {
$form['translators']['#tree'] = TRUE;
$form['translators']['#theme'] = 'tmgmt_ui_translator_overview_form';
$form['translators']['#entity_info'] = $this->entityInfo;
// Load all translator entities.
$translators = tmgmt_translator_load_multiple(FALSE);
foreach ($translators as $key => $translator) {
$form['translators'][$key] = $this
->overviewFormRow(array(), $form_state, $translator, $key);
$form['translators'][$key]['#translator'] = $translator;
}
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
return $form;
}