You are here

public function IpGeoLocViewsPluginStyle::pluginStyleAddAssociationSubmit in IP Geolocation Views & Maps 8

Submit handler for the "Add another association" button.

Increments the counter and forces a form rebuild.

1 call to IpGeoLocViewsPluginStyle::pluginStyleAddAssociationSubmit()
IpGeoLocViewsPluginStyle::pluginStyleBulkOfForm in src/Services/IpGeoLocViewsPluginStyle.php
The bulk of the plugin style form.

File

src/Services/IpGeoLocViewsPluginStyle.php, line 355

Class

IpGeoLocViewsPluginStyle
Class IpGeoLocViewsPluginStyle.

Namespace

Drupal\ip_geoloc\Services

Code

public function pluginStyleAddAssociationSubmit($form, FormStateInterface &$form_state) {
  $form_state
    ->set('num_associations', $form_state
    ->get('num_associations') + 1);
  $form_state
    ->setRebuild();
}