public function PathologicSettingsForm::buildForm in Pathologic 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 ConfigFormBase::buildForm
File
- src/
PathologicSettingsForm.php, line 21
Class
Namespace
Drupal\pathologicCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('pathologic.settings');
$form['reminder'] = [
'#type' => 'markup',
'#markup' => '<p>' . $this
->t('Reminder: The settings on this form only affect text formats for which Pathologic is configured to use the global Pathologic settings; if it’s configured to use per-format settings, these settings will have no effect.') . '</p>',
'#weight' => 0,
];
$defaults = [
'protocol_style' => $config
->get('protocol_style'),
'local_paths' => $config
->get('local_paths'),
];
$common = new PathologicSettingsCommon();
$form += $common
->commonSettingsForm($defaults);
return parent::buildForm($form, $form_state);
}