You are here

public function ConfigPagesForm::configPagesClearValues in Config Pages 8.2

Same name and namespace in other branches
  1. 8.3 src/ConfigPagesForm.php \Drupal\config_pages\ConfigPagesForm::configPagesClearValues()
  2. 8 src/ConfigPagesForm.php \Drupal\config_pages\ConfigPagesForm::configPagesClearValues()

Clear field values submit callback.

Parameters

array $form: Form.

\Drupal\Core\Form\FormStateInterface $form_state: Form state.

File

src/ConfigPagesForm.php, line 261

Class

ConfigPagesForm
Form controller for the custom config page edit forms.

Namespace

Drupal\config_pages

Code

public function configPagesClearValues(array $form, FormStateInterface $form_state) {
  $entity = $this->entity;
  $form_state
    ->setRedirectUrl(Url::fromRoute('entity.config_pages.clear_confirmation', [
    'config_pages' => $entity
      ->id(),
  ]));
}