You are here

QueuerConfigForm.php in Purge 8.3

File

tests/modules/purge_queuer_test/src/Form/QueuerConfigForm.php
View source
<?php

namespace Drupal\purge_queuer_test\Form;

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

/**
 * Queuer with a configuration form.
 *
 * @see \Drupal\purge_queuer_test\Plugin\Purge\Queuer\WithFormQueuer.
 */
class QueuerConfigForm extends QueuerConfigFormBase {

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

  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'purge_queuer_test.configform';
  }

  /**
   * {@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
QueuerConfigForm Queuer with a configuration form.