trait SlickFormatterTrait in Slick Carousel 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/SlickFormatterTrait.php \Drupal\slick\Plugin\Field\FieldFormatter\SlickFormatterTrait
- 7.3 src/Plugin/Field/FieldFormatter/SlickFormatterTrait.php \Drupal\slick\Plugin\Field\FieldFormatter\SlickFormatterTrait
A Trait common for slick formatters.
Hierarchy
- trait \Drupal\slick\Plugin\Field\FieldFormatter\SlickFormatterTrait
File
- src/
Plugin/ Field/ FieldFormatter/ SlickFormatterTrait.php, line 10
Namespace
Drupal\slick\Plugin\Field\FieldFormatterView source
trait SlickFormatterTrait {
/**
* The slick field formatter manager.
*
* @var \Drupal\slick\SlickFormatterInterface
*/
protected $formatter;
/**
* The slick field formatter manager.
*
* @var \Drupal\slick\SlickManagerInterface
*/
protected $manager;
/**
* Returns the slick field formatter service.
*/
public function formatter() {
return $this->formatter;
}
/**
* Returns the slick service.
*/
public function manager() {
return $this->manager;
}
/**
* Returns the slick admin service shortcut.
*/
public function admin() {
return \Drupal::service('slick.admin');
}
/**
* {@inheritdoc}
*/
public function settingsSummary() {
// @todo: Remove second param post Blazy RC2+.
return $this
->admin()
->getSettingsSummary($this
->getScopedFormElements(), $this);
}
/**
* {@inheritdoc}
*/
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return $field_definition
->getFieldStorageDefinition()
->isMultiple();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SlickFormatterTrait:: |
protected | property | The slick field formatter manager. | |
SlickFormatterTrait:: |
protected | property | The slick field formatter manager. | |
SlickFormatterTrait:: |
public | function | Returns the slick admin service shortcut. | |
SlickFormatterTrait:: |
public | function | Returns the slick field formatter service. | |
SlickFormatterTrait:: |
public static | function | 1 | |
SlickFormatterTrait:: |
public | function | Returns the slick service. | |
SlickFormatterTrait:: |
public | function |