public function Pager::defaultConfiguration in Views Slideshow 8.4
Gets default configuration for this plugin.
Return value
array An associative array with the default configuration.
Overrides ViewsSlideshowWidgetTypeBase::defaultConfiguration
File
- src/
Plugin/ ViewsSlideshowWidgetType/ Pager.php, line 28
Class
- Pager
- Provides a pager widget type.
Namespace
Drupal\views_slideshow\Plugin\ViewsSlideshowWidgetTypeCode
public function defaultConfiguration() {
$options = parent::defaultConfiguration() + [
'type' => [
'default' => 0,
],
'views_slideshow_pager_numbered_hover' => [
'default' => 0,
],
'views_slideshow_pager_numbered_click_to_page' => [
'default' => 0,
],
'views_slideshow_pager_thumbnails_hover' => [
'default' => 0,
],
'views_slideshow_pager_thumbnails_click_to_page' => [
'default' => 0,
],
];
/* @var \Drupal\Component\Plugin\PluginManagerInterface */
$widgetManager = \Drupal::service('plugin.manager.views_slideshow.widget');
// Get default configuration of all Pager plugins.
foreach ($widgetManager
->getDefinitions($this
->getPluginId()) as $widget_id => $widget_info) {
$options += $widgetManager
->createInstance($widget_id, [])
->defaultConfiguration();
}
return $options;
}