Same name and namespace in other branches
- 8.x-4.x modules/views_slideshow_cycle/src/Plugin/ViewsSlideshowType/Cycle.php \Drupal\views_slideshow_cycle\Plugin\ViewsSlideshowType\Cycle::validateConfigurationForm()
Overrides ViewsSlideshowTypeBase::validateConfigurationForm
File
-
modules/
views_slideshow_cycle/ src/ Plugin/ ViewsSlideshowType/ Cycle.php, line 550
Class
- Cycle
- Provides a slideshow type based on jquery cycle.
Namespace
Drupal\views_slideshow_cycle\Plugin\ViewsSlideshowTypeCode
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
$values = $form_state->getValue([
'style_options',
'views_slideshow_cycle',
]);
if (!is_numeric($values['timeout'])) {
$form_state->setErrorByName('style_options][views_slideshow_cycle][timeout', $this->t('@setting must be numeric!', [
'@setting' => $this->t('Timeout'),
]));
}
if (!is_numeric($values['speed'])) {
$form_state->setErrorByName('style_options][views_slideshow_cycle][speed', $this->t('@setting must be numeric!', [
'@setting' => $this->t('Speed'),
]));
}
if (!is_numeric($values['remember_slide_days'])) {
$form_state->setErrorByName('style_options][views_slideshow_cycle][remember_slide_days', $this->t('@setting must be numeric!', [
'@setting' => $this->t('Slide days'),
]));
}
}