abstract class SlickEntityFormatterBase in Slick Carousel 7.3
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/SlickEntityFormatterBase.php \Drupal\slick\Plugin\Field\FieldFormatter\SlickEntityFormatterBase
- 8 src/Plugin/Field/FieldFormatter/SlickEntityFormatterBase.php \Drupal\slick\Plugin\Field\FieldFormatter\SlickEntityFormatterBase
Base class for slick entity reference formatters without field details.
Hierarchy
- class \Drupal\blazy\Plugin\Field\FieldFormatter\FormatterBase implements FormatterInterface
- class \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyFormatterBase
- class \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyEntityBase
- class \Drupal\slick\Plugin\Field\FieldFormatter\SlickEntityFormatterBase uses SlickFormatterTrait
- class \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyEntityBase
- class \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyFormatterBase
Expanded class hierarchy of SlickEntityFormatterBase
File
- src/
Plugin/ Field/ FieldFormatter/ SlickEntityFormatterBase.php, line 13
Namespace
Drupal\slick\Plugin\Field\FieldFormatterView source
abstract class SlickEntityFormatterBase extends BlazyEntityBase {
use SlickFormatterTrait;
/**
* Constructs a SlickEntityFormatter instance.
*/
public function __construct($plugin_id, $field, $instance, SlickFormatterInterface $formatter, SlickManagerInterface $manager) {
parent::__construct($plugin_id, $field, $instance);
$this->formatter = $formatter;
$this->manager = $manager;
}
/**
* {@inheritdoc}
*/
public static function defaultSettings() {
return SlickDefault::baseSettings() + [
'view_mode' => '',
];
}
/**
* {@inheritdoc}
*/
public function buildSettings() {
$settings = parent::buildSettings();
// Asks for Blazy to deal with iFrames, and mobile-optimized lazy loading.
$settings['blazy'] = TRUE;
$settings['vanilla'] = TRUE;
return $settings;
}
/**
* {@inheritdoc}
*/
public function getScopedFormElements() {
return [
'no_layouts' => TRUE,
] + parent::getScopedFormElements();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlazyEntityBase:: |
protected | property | The blazy entity instance. | |
BlazyEntityBase:: |
public | function | Returns the blazy entity object. | |
BlazyEntityBase:: |
public | function |
Build individual item contents. Overrides BlazyFormatterBase:: |
1 |
BlazyEntityBase:: |
public | function | Returns media contents. | |
BlazyEntityBase:: |
protected | function |
Converts $items array to object for easy D8 -> D7 backports. Overrides BlazyFormatterBase:: |
|
BlazyEntityBase:: |
public | function |
Implements hook_field_formatter_settings_form(). Overrides BlazyFormatterBase:: |
1 |
BlazyFormatterBase:: |
public | function |
Returns required form elements for the current formatter. Overrides FormatterBase:: |
2 |
BlazyFormatterTrait:: |
protected | property | The blazy-related formatter service. | |
BlazyFormatterTrait:: |
protected | property | The blazy field formatter manager. | |
BlazyFormatterTrait:: |
public | function | Returns the blazy-related formatter. | |
BlazyFormatterTrait:: |
public | function | Returns the blazy service. | |
BlazyFormatterTrait:: |
public | function | ||
FormatterBase:: |
protected | property | The blazy-related admin formatter service. | |
FormatterBase:: |
protected | property | Whether default settings have been merged into the current $settings. | |
FormatterBase:: |
protected | property | The field definition. | |
FormatterBase:: |
protected | property | The field display. | |
FormatterBase:: |
protected | property | The field instance. | |
FormatterBase:: |
protected | property | The form settings. | |
FormatterBase:: |
protected | property | True if the field cardinality equals -1. | |
FormatterBase:: |
protected | property | The known hard-coded entities. | |
FormatterBase:: |
protected | property | The langcode. | |
FormatterBase:: |
protected | property | The blazy formatter plugin id. | |
FormatterBase:: |
protected | property | The formatter settings. | |
FormatterBase:: |
protected | property | The view mode. | |
FormatterBase:: |
public | function | Implements hook_field_formatter_settings_form(). | |
FormatterBase:: |
public | function | ||
FormatterBase:: |
public | function | Gets html settings. | |
FormatterBase:: |
public | function | Gets formatter plugin id. | |
FormatterBase:: |
public | function | ||
FormatterBase:: |
public | function | Gets formatter settings. | |
FormatterBase:: |
protected | function | Merges default settings values into $settings. | |
FormatterBase:: |
public | function | Sets html settings. | |
FormatterBase:: |
public | function | ||
FormatterBase:: |
public | function | Sets formatter settings. | |
FormatterBase:: |
protected | function | Setup common variables across different hooks. | |
FormatterBase:: |
public | function | Implements hook_field_formatter_view(). | |
SlickEntityFormatterBase:: |
public | function |
Builds the settings. Overrides FormatterBase:: |
|
SlickEntityFormatterBase:: |
public static | function |
Returns default settings. Overrides BlazyFormatterBase:: |
|
SlickEntityFormatterBase:: |
public | function |
Defines the scope for the form elements. Overrides BlazyEntityBase:: |
|
SlickEntityFormatterBase:: |
public | function |
Constructs a SlickEntityFormatter instance. Overrides FormatterBase:: |
|
SlickFormatterTrait:: |
public | function | Returns the slick admin service. | |
SlickFormatterTrait:: |
public | function | 1 |