You are here

public function MobileDeviceDetectionExtenderPlugin::submitOptionsForm in Mobile Device Detection 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/views/display_extender/MobileDeviceDetectionExtenderPlugin.php \Drupal\mobile_device_detection\Plugin\views\display_extender\MobileDeviceDetectionExtenderPlugin::submitOptionsForm()
  2. 8.2 src/Plugin/views/display_extender/MobileDeviceDetectionExtenderPlugin.php \Drupal\mobile_device_detection\Plugin\views\display_extender\MobileDeviceDetectionExtenderPlugin::submitOptionsForm()

Handle any special handling on the validate form.

Overrides DisplayExtenderPluginBase::submitOptionsForm

File

src/Plugin/views/display_extender/MobileDeviceDetectionExtenderPlugin.php, line 80

Class

MobileDeviceDetectionExtenderPlugin
Default display extender plugin; does nothing.

Namespace

Drupal\mobile_device_detection\Plugin\views\display_extender

Code

public function submitOptionsForm(&$form, FormStateInterface $form_state) {
  if ($form_state
    ->get('section') == 'device_detection') {
    $device_detection = $form_state
      ->getValue('device_detection');
    $this->options['device_detection'] = $device_detection;
  }
}