config('pathologic.settings'); $form['reminder'] = [ '#type' => 'markup', '#markup' => '

' . $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.') . '

', '#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); } /** * {@inheritdoc} */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->config('pathologic.settings') ->set('protocol_style', $form_state->getValue('protocol_style')) ->set('local_paths', $form_state->getValue('local_paths')) ->save(); parent::submitForm($form, $form_state); } /** * @inheritdoc */ protected function getEditableConfigNames() { return [ 'pathologic.settings', ]; } }