SlickEntityReferenceFormatterBase.php in Slick Carousel 7.3
File
src/Plugin/Field/FieldFormatter/SlickEntityReferenceFormatterBase.php
View source
<?php
namespace Drupal\slick\Plugin\Field\FieldFormatter;
use Drupal\blazy\Plugin\Field\FieldFormatter\BlazyEntityReferenceBase;
use Drupal\slick\SlickDefault;
use Drupal\slick\SlickFormatterInterface;
use Drupal\slick\SlickManagerInterface;
abstract class SlickEntityReferenceFormatterBase extends BlazyEntityReferenceBase {
use SlickFormatterTrait;
public static function defaultSettings() {
return SlickDefault::extendedSettings() + parent::defaultSettings();
}
public function __construct($plugin_id, $field, $instance, SlickFormatterInterface $formatter, SlickManagerInterface $manager) {
parent::__construct($plugin_id, $field, $instance);
$this->formatter = $formatter;
$this->manager = $manager;
}
public function getScopedFormElements() {
$scopes = parent::getScopedFormElements();
return [
'nav' => TRUE,
'layouts' => $this->stringOptions,
'thumb_captions' => $this->textOptions,
'thumb_positions' => TRUE,
'use_view_mode' => TRUE,
'vanilla' => TRUE,
] + $scopes;
}
}