public function FilterBaseForm::addOneValue in Entity Share 8
Same name and namespace in other branches
- 8.3 modules/entity_share_server/src/Form/FilterBaseForm.php \Drupal\entity_share_server\Form\FilterBaseForm::addOneValue()
- 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 85
Class
- FilterBaseForm
- Class FilterBaseForm.
Namespace
Drupal\entity_share_server\FormCode
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();
}