public function LingotekSettingsTabIntegrationsForm::buildForm in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 8.2 src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
- 4.0.x src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
- 3.0.x src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
- 3.1.x src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
- 3.2.x src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
- 3.3.x src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
- 3.5.x src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
- 3.6.x src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
- 3.7.x src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
- 3.8.x src/Form/LingotekSettingsTabIntegrationsForm.php \Drupal\lingotek\Form\LingotekSettingsTabIntegrationsForm::buildForm()
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 ConfigFormBase::buildForm
File
- src/
Form/ LingotekSettingsTabIntegrationsForm.php, line 89
Class
- LingotekSettingsTabIntegrationsForm
- Configure integration modules settings for Lingotek.
Namespace
Drupal\lingotek\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->configFactory()
->getEditable('lingotek.settings');
$form = parent::buildForm($form, $form_state);
if ($this->moduleHandler
->moduleExists('paragraphs')) {
if (!isset($form['contrib'])) {
$form['contrib']['#tree'] = TRUE;
}
$form['contrib']['paragraphs'] = [
'#title' => $this
->t('Paragraphs'),
'#type' => 'details',
];
$form['contrib']['paragraphs']['enable_bulk_management'] = [
'#title' => $this
->t('Enable paragraphs to be managed individually instead of embedded in their parent entity.'),
'#type' => 'checkbox',
'#default_value' => $config
->get('preference.contrib.paragraphs.enable_bulk_management'),
];
}
$form['actions']['submit']['#value'] = $this
->t('Save settings');
return $form;
}