SlickSkinPluginBase.php in Slick Carousel 8.2
File
src/SlickSkinPluginBase.php
View source
<?php
namespace Drupal\slick;
use Drupal\Core\Plugin\PluginBase;
use Drupal\Core\StringTranslation\StringTranslationTrait;
abstract class SlickSkinPluginBase extends PluginBase implements SlickSkinPluginInterface {
use StringTranslationTrait;
protected $skins;
protected $arrows;
protected $dots;
public function __construct(array $configuration, $plugin_id, $plugin_definition) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->skins = $this
->setSkins();
$this->arrows = $this
->setArrows();
$this->dots = $this
->setDots();
}
public function label() {
return $this->configuration['label'];
}
public function skins() {
return $this->skins;
}
public function arrows() {
return $this->arrows;
}
public function dots() {
return $this->dots;
}
protected abstract function setSkins();
protected function setArrows() {
return [];
}
protected function setDots() {
return [];
}
}