public function MobileDeviceDetectionExtenderPlugin::getDevices in Mobile Device Detection 8
Same name and namespace in other branches
- 8.3 src/Plugin/views/display_extender/MobileDeviceDetectionExtenderPlugin.php \Drupal\mobile_device_detection\Plugin\views\display_extender\MobileDeviceDetectionExtenderPlugin::getDevices()
- 8.2 src/Plugin/views/display_extender/MobileDeviceDetectionExtenderPlugin.php \Drupal\mobile_device_detection\Plugin\views\display_extender\MobileDeviceDetectionExtenderPlugin::getDevices()
Get the selected devices for this display.
Return value
array
2 calls to MobileDeviceDetectionExtenderPlugin::getDevices()
- MobileDeviceDetectionExtenderPlugin::buildOptionsForm in src/
Plugin/ views/ display_extender/ MobileDeviceDetectionExtenderPlugin.php - Provide a form to edit options for this plugin.
- MobileDeviceDetectionExtenderPlugin::optionsSummary in src/
Plugin/ views/ display_extender/ MobileDeviceDetectionExtenderPlugin.php - Provide the default summary for options and category in the views UI.
File
- src/
Plugin/ views/ display_extender/ MobileDeviceDetectionExtenderPlugin.php, line 108
Class
- MobileDeviceDetectionExtenderPlugin
- Default display extender plugin; does nothing.
Namespace
Drupal\mobile_device_detection\Plugin\views\display_extenderCode
public function getDevices() {
$devices = isset($this->options['device_detection']) ? $this->options['device_detection'] : null;
if ($devices && isset($devices['devices'])) {
$devices = array_filter($devices['devices'], function ($var) {
return $var != false;
});
}
return $devices;
}