You are here

public function FilterBaseForm::addOneValue in Entity Share 8.3

Same name and namespace in other branches
  1. 8 modules/entity_share_server/src/Form/FilterBaseForm.php \Drupal\entity_share_server\Form\FilterBaseForm::addOneValue()
  2. 8.2 modules/entity_share_server/src/Form/FilterBaseForm.php \Drupal\entity_share_server\Form\FilterBaseForm::addOneValue()

Submit handler for the "add a value" button.

Increments the max counter and causes a rebuild.

Parameters

array $form: The form array.

\Drupal\Core\Form\FormStateInterface $form_state: The form state object.

File

modules/entity_share_server/src/Form/FilterBaseForm.php, line 87

Class

FilterBaseForm
Base class for filter form.

Namespace

Drupal\entity_share_server\Form

Code

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