GridStackParagraphsFormatter.php in GridStack 8.2
File
src/Plugin/Field/FieldFormatter/GridStackParagraphsFormatter.php
View source
<?php
namespace Drupal\gridstack\Plugin\Field\FieldFormatter;
use Drupal\Core\Field\FieldDefinitionInterface;
class GridStackParagraphsFormatter extends GridStackEntityFormatterBase {
public static function isApplicable(FieldDefinitionInterface $field_definition) {
$storage = $field_definition
->getFieldStorageDefinition();
return $storage
->isMultiple() && $storage
->getSetting('target_type') === 'paragraph';
}
}