public function ContentSettingsForm::buildForm in Content Synchronization 8
Same name and namespace in other branches
- 8.2 src/Form/ContentSettingsForm.php \Drupal\content_sync\Form\ContentSettingsForm::buildForm()
- 3.0.x src/Form/ContentSettingsForm.php \Drupal\content_sync\Form\ContentSettingsForm::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/ ContentSettingsForm.php, line 20
Class
Namespace
Drupal\content_sync\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$config = $this
->config('content_sync.settings');
$form['site_uuid_override'] = array(
'#type' => 'checkbox',
'#title' => $this
->t('Bypass site UUID validation'),
'#description' => $this
->t('If checked, site UUID validation would be ignored allowing to import the staged content even if it originates from a different site than this site.'),
'#default_value' => $config
->get('content_sync.site_uuid_override'),
);
$form['help_menu_disabled'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Disable help menu'),
'#description' => $this
->t("If checked, 'How can we help you?' menu will be disabled."),
'#return_value' => TRUE,
'#default_value' => $config
->get('content_sync.help_menu_disabled'),
];
return $form;
}