You are here

public function SanitizerForm::submitForm in Layout Builder Block Sanitizer 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

src/Form/SanitizerForm.php, line 98

Class

SanitizerForm
Class SanitizerForm.

Namespace

Drupal\layout_builder_block_sanitizer\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $nid_to_sanitize = $form_state
    ->getValue('node_to_sanitize');
  $this->layoutBuilderBlockSanitizerManager
    ->sanitizeNode($nid_to_sanitize);
}