You are here

public function GlobalLinkTranslatorUi::addfilterSubmit in GlobalLink Connect for Drupal 8

Same name and namespace in other branches
  1. 8.2 src/GlobalLinkTranslatorUi.php \Drupal\globallink\GlobalLinkTranslatorUi::addfilterSubmit()

Adds sensor to entity when 'Add another filter' button is pressed.

Parameters

array $form: The form structure array.

FormStateInterface $form_state: The form state structure.

File

src/GlobalLinkTranslatorUi.php, line 361
Contains Drupal\globallink\GlobalLinkTranslatorUi.

Class

GlobalLinkTranslatorUi
GlobalLink translator UI.

Namespace

Drupal\globallink

Code

public function addfilterSubmit(array $form, FormStateInterface $form_state) {
  $form_state
    ->setRebuild();
  $form_state
    ->set('filters_rows', $form_state
    ->get('filters_rows') + 1);
  drupal_set_message(t('Filter added.'), 'status');
}