ViewsSlideshowWidgetBase.php in Views Slideshow 8.4
File
src/ViewsSlideshowWidgetBase.php
View source
<?php
namespace Drupal\views_slideshow;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
abstract class ViewsSlideshowWidgetBase extends PluginBase implements ViewsSlideshowWidgetInterface {
use StringTranslationTrait;
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this
->setConfiguration($configuration);
}
public function getTitle() {
return $this->pluginDefinition['title'];
}
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
return [];
}
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
}
public function defaultConfiguration() {
return [];
}
public function getConfiguration() {
return [
'id' => $this
->getPluginId(),
] + $this->configuration;
}
public function setConfiguration(array $configuration) {
$this->configuration = $configuration + $this
->defaultConfiguration();
return $this;
}
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
}
public function calculateDependencies() {
return [];
}
public function checkCompatiblity($view) {
return TRUE;
}
}