class GridStackMediaFormatter in GridStack 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/GridStackMediaFormatter.php \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackMediaFormatter
Plugin implementation of the 'GridStack Media' formatter.
Hierarchy
- class \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackEntityFormatterBase extends \Drupal\blazy\Dejavu\BlazyEntityBase implements ContainerFactoryPluginInterface uses GridStackFormatterTrait
- class \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackMediaFormatter
Expanded class hierarchy of GridStackMediaFormatter
File
- src/
Plugin/ Field/ FieldFormatter/ GridStackMediaFormatter.php, line 10
Namespace
Drupal\gridstack\Plugin\Field\FieldFormatterView source
class GridStackMediaFormatter extends GridStackEntityFormatterBase {
/**
* {@inheritdoc}
*/
public static function isApplicable(FieldDefinitionInterface $field_definition) {
$storage = $field_definition
->getFieldStorageDefinition();
return $storage
->isMultiple() && $storage
->getSetting('target_type') === 'media';
}
}