trait BlazyFormatterBaseTrait in Blazy 8
A Trait common for blazy image, video and file ER formatters.
Hierarchy
- trait \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyFormatterBaseTrait
1 file declares its use of BlazyFormatterBaseTrait
- BlazyTestEntityReferenceFormatterTest.php in tests/
modules/ blazy_test/ src/ Plugin/ Field/ FieldFormatter/ BlazyTestEntityReferenceFormatterTest.php
File
- src/
Plugin/ Field/ FieldFormatter/ BlazyFormatterBaseTrait.php, line 8
Namespace
Drupal\blazy\Plugin\Field\FieldFormatterView source
trait BlazyFormatterBaseTrait {
/**
* The blazy manager service.
*
* @var \Drupal\blazy\BlazyFormatterManager
*/
protected $blazyManager;
/**
* Returns the blazy manager.
*/
public function blazyManager() {
return $this->blazyManager;
}
/**
* Builds the settings.
*/
public function buildSettings() {
$settings = $this
->getSettings();
$settings['plugin_id'] = $this
->getPluginId();
return $settings;
}
/**
* Returns the blazy admin service.
*/
public function admin() {
return \Drupal::service('blazy.admin.formatter');
}
/**
* {@inheritdoc}
*/
public function settingsSummary() {
return $this
->admin()
->getSettingsSummary($this
->getScopedFormElements());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlazyFormatterBaseTrait:: |
protected | property | The blazy manager service. | |
BlazyFormatterBaseTrait:: |
public | function | Returns the blazy admin service. | 1 |
BlazyFormatterBaseTrait:: |
public | function | Returns the blazy manager. | |
BlazyFormatterBaseTrait:: |
public | function | Builds the settings. | 1 |
BlazyFormatterBaseTrait:: |
public | function |