BlazyFormatterBaseTrait.php in Blazy 8
File
src/Plugin/Field/FieldFormatter/BlazyFormatterBaseTrait.php
View source
<?php
namespace Drupal\blazy\Plugin\Field\FieldFormatter;
trait BlazyFormatterBaseTrait {
protected $blazyManager;
public function blazyManager() {
return $this->blazyManager;
}
public function buildSettings() {
$settings = $this
->getSettings();
$settings['plugin_id'] = $this
->getPluginId();
return $settings;
}
public function admin() {
return \Drupal::service('blazy.admin.formatter');
}
public function settingsSummary() {
return $this
->admin()
->getSettingsSummary($this
->getScopedFormElements());
}
}