You are here

PurgerConfigForm.php in Purge 8.3

File

tests/modules/purge_purger_test/src/Form/PurgerConfigForm.php
View source
<?php

namespace Drupal\purge_purger_test\Form;

use Drupal\Core\Form\FormStateInterface;
use Drupal\purge_ui\Form\PurgerConfigFormBase;

/**
 * Configuration form for a test purger.
 *
 * @see \Drupal\purge_purger_test\Plugin\Purge\Purger\PurgerWithForm.
 */
class PurgerConfigForm extends PurgerConfigFormBase {

  /**
   * {@inheritdoc}
   */
  protected function getEditableConfigNames() {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'purge_purger_test.purgerconfigform';
  }

  /**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
    $form['textfield'] = [
      '#type' => 'textfield',
      '#title' => $this
        ->t('Test'),
      '#required' => FALSE,
    ];
    return parent::buildForm($form, $form_state);
  }

  /**
   * {@inheritdoc}
   */
  public function submitFormSuccess(array &$form, FormStateInterface $form_state) {

    // Nothing to do here.
  }

}

Classes

Namesort descending Description
PurgerConfigForm Configuration form for a test purger.