You are here

public function MobileDeviceDetectionExtenderPlugin::optionsSummary 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::optionsSummary()
  2. 8.2 src/Plugin/views/display_extender/MobileDeviceDetectionExtenderPlugin.php \Drupal\mobile_device_detection\Plugin\views\display_extender\MobileDeviceDetectionExtenderPlugin::optionsSummary()

Provide the default summary for options and category in the views UI.

Overrides DisplayExtenderPluginBase::optionsSummary

File

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

Class

MobileDeviceDetectionExtenderPlugin
Default display extender plugin; does nothing.

Namespace

Drupal\mobile_device_detection\Plugin\views\display_extender

Code

public function optionsSummary(&$categories, &$options) {
  $categories['device_detection'] = array(
    'title' => $this
      ->t('Show "View" on special devices'),
    'column' => 'second',
  );
  $options['device_detection'] = array(
    'category' => 'other',
    'title' => $this
      ->t('Show "View" on special devices'),
    'value' => $this
      ->getDevices() ? implode(', ', $this
      ->getDevices()) : $this
      ->t('none'),
  );
}