trait GridStackFormatterTrait in GridStack 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/GridStackFormatterTrait.php \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackFormatterTrait
A Trait common for gridstack formatters.
Hierarchy
- trait \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackFormatterTrait
File
- src/
Plugin/ Field/ FieldFormatter/ GridStackFormatterTrait.php, line 10
Namespace
Drupal\gridstack\Plugin\Field\FieldFormatterView source
trait GridStackFormatterTrait {
/**
* The gridstack field formatter manager.
*
* @var \Drupal\gridstack\GridStackFormatterInterface
*/
protected $formatter;
/**
* The gridstack field formatter manager.
*
* @var \Drupal\gridstack\GridStackManagerInterface
*/
protected $manager;
/**
* Returns the gridstack field formatter service.
*/
public function formatter() {
return $this->formatter;
}
/**
* Returns the gridstack service.
*/
public function manager() {
return $this->manager;
}
/**
* Returns the gridstack admin service shortcut.
*/
public function admin() {
return \Drupal::service('gridstack.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 |
---|---|---|---|---|
GridStackFormatterTrait:: |
protected | property | The gridstack field formatter manager. | |
GridStackFormatterTrait:: |
protected | property | The gridstack field formatter manager. | |
GridStackFormatterTrait:: |
public | function | Returns the gridstack admin service shortcut. | |
GridStackFormatterTrait:: |
public | function | Returns the gridstack field formatter service. | |
GridStackFormatterTrait:: |
public static | function | 3 | |
GridStackFormatterTrait:: |
public | function | Returns the gridstack service. | |
GridStackFormatterTrait:: |
public | function |