public function EncryptSettingsForm::buildForm in Encrypt 8.3
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/ EncryptSettingsForm.php, line 30
Class
- EncryptSettingsForm
- Form builder for the encrypt settings admin page.
Namespace
Drupal\encrypt\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = parent::buildForm($form, $form_state);
$config = $this
->config('encrypt.settings');
$form['check_profile_status'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Show the validation status of encryption profiles.'),
'#description' => $this
->t('On the encryption profiles overview page, automatically validate each encryption profile to check if there are problems with it. Disable when you have a lot of encryption profiles and are encountering performance issues, or if you do not want encryption keys to be loaded by the status check.'),
'#default_value' => $config
->get('check_profile_status'),
];
$form['allow_deprecated_plugins'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Allow the use of deprecated plugins.'),
'#description' => $this
->t('Enable this setting to allow the use of deprecated encryption plugins in new profiles. Leave disabled to only allow their use in existing profiles'),
'#default_value' => $config
->get('allow_deprecated_plugins'),
];
return $form;
}