You are here

public function ReleaseNotes::submitConfigurationForm in Production check & Production monitor 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().

Overrides ProdCheckBase::submitConfigurationForm

File

src/Plugin/ProdCheck/Server/ReleaseNotes.php, line 107

Class

ReleaseNotes
Release notes check

Namespace

Drupal\prod_check\Plugin\ProdCheck\Server

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  parent::submitConfigurationForm($form, $form_state);
  $files = $form_state
    ->getValue('files');
  $files = explode("\n", $files);

  // Ensure that all strings are trimmed, eg. don't have extra spaces,
  // \r chars etc.
  foreach ($files as $k => $v) {
    $files[$k] = trim($v);
  }
  $this->configuration['files'] = $files;
}