Same name and namespace in other branches
- 5.0.x src/ViewsSlideshowWidgetTypeBase.php \Drupal\views_slideshow\ViewsSlideshowWidgetTypeBase::buildConfigurationForm()
2 methods override ViewsSlideshowWidgetTypeBase::buildConfigurationForm()
- Controls::buildConfigurationForm in src/
Plugin/ ViewsSlideshowWidgetType/ Controls.php - Pager::buildConfigurationForm in src/
Plugin/ ViewsSlideshowWidgetType/ Pager.php
File
-
src/
ViewsSlideshowWidgetTypeBase.php, line 34
Class
- ViewsSlideshowWidgetTypeBase
- Base class for a Views slideshow widget type.
Namespace
Drupal\views_slideshowCode
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
// Add field to see if they would like to hide controls if there is only
// one slide.
$form['hide_on_single_slide'] = [
'#type' => 'checkbox',
'#title' => $this->t('Hide controls if there is only one slide'),
'#default_value' => $this->getConfiguration()['hide_on_single_slide'],
'#description' => $this->t('Should the controls be hidden if there is only one slide.'),
'#states' => [
'visible' => [
':input[name="' . $this->getConfiguration()['dependency'] . '[enable]"]' => [
'checked' => TRUE,
],
],
],
];
return $form;
}