class GridStackEntityFormatter in GridStack 8.2
Plugin implementation of the 'GridStack Entity' formatter.
Plugin annotation
@FieldFormatter(
id = "gridstack_entity",
label = @Translation("GridStack Entity"),
description = @Translation("Display the entity reference as a GridStack."),
field_types = {"entity_reference"},
quickedit = {"editor" = "disabled"}
)
Hierarchy
- class \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackEntityFormatterBase extends \Drupal\blazy\Dejavu\BlazyEntityBase uses GridStackFormatterTrait, GridStackFormatterViewTrait
- class \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackEntityFormatter
Expanded class hierarchy of GridStackEntityFormatter
File
- src/
Plugin/ Field/ FieldFormatter/ GridStackEntityFormatter.php, line 18
Namespace
Drupal\gridstack\Plugin\Field\FieldFormatterView source
class GridStackEntityFormatter extends GridStackEntityFormatterBase {
/**
* {@inheritdoc}
*/
public static function isApplicable(FieldDefinitionInterface $field_definition) {
$storage = $field_definition
->getFieldStorageDefinition();
return $storage
->isMultiple() && $storage
->getSetting('target_type') !== 'media';
}
}