public function TranslationForm::buildForm in Localization client 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides FormInterface::buildForm
File
- l10n_client_ui/
src/ Form/ TranslationForm.php, line 29
Class
- TranslationForm
- Settings form for the localization client user interface module.
Namespace
Drupal\l10n_client_ui\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['filters'] = array(
'#type' => 'container',
);
$form['filters']['language'] = array(
'#title' => $this
->t('Language'),
'#type' => 'select',
'#options' => $this->languages,
);
$form['filters']['stats'] = array(
'#title' => $this
->t('Stats'),
'#type' => 'item',
'#markup' => '<div class="l10n_client_ui--stats"><div class="l10n_client_ui--stats-done"></div></div>',
);
$form['filters']['type'] = array(
'#title' => $this
->t('Find and translate'),
'#type' => 'select',
'#options' => array(
'false' => $this
->t('Untranslated strings'),
'true' => $this
->t('Translated strings'),
),
);
$form['filters']['search'] = array(
'#title' => $this
->t('Contains'),
'#type' => 'search',
'#placeholder' => $this
->t('Search'),
);
$form['list'] = array(
'#type' => 'container',
);
$form['list']['table'] = array(
'#type' => 'table',
'#header' => array(
$this
->t('Source'),
$this
->t('Translation'),
$this
->t('Save'),
$this
->t('Skip'),
),
);
return $form;
}