You are here

public function HttpPurgerFormBase::buildFormHeadersAdd in Generic HTTP Purger 8

Build the 'headers' section of the form: increments the item count.

Parameters

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

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

File

src/Form/HttpPurgerFormBase.php, line 348

Class

HttpPurgerFormBase
Abstract form base for HTTP based configurable purgers.

Namespace

Drupal\purge_purger_http\Form

Code

public function buildFormHeadersAdd(array &$form, FormStateInterface $form_state) {
  $count = $form_state
    ->get('headers_items_count');
  $count++;
  $form_state
    ->set('headers_items_count', $count);
  $form_state
    ->setRebuild();
}