You are here

class GridStackParagraphsFormatter in GridStack 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldFormatter/GridStackParagraphsFormatter.php \Drupal\gridstack\Plugin\Field\FieldFormatter\GridStackParagraphsFormatter

Plugin implementation of the 'GridStack Paragraphs' formatter.

Hierarchy

Expanded class hierarchy of GridStackParagraphsFormatter

File

src/Plugin/Field/FieldFormatter/GridStackParagraphsFormatter.php, line 10

Namespace

Drupal\gridstack\Plugin\Field\FieldFormatter
View source
class GridStackParagraphsFormatter extends GridStackEntityFormatterBase {

  /**
   * {@inheritdoc}
   */
  public static function isApplicable(FieldDefinitionInterface $field_definition) {
    $storage = $field_definition
      ->getFieldStorageDefinition();
    return $storage
      ->isMultiple() && $storage
      ->getSetting('target_type') === 'paragraph';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
GridStackEntityFormatterBase::buildElement public function
GridStackEntityFormatterBase::buildSettings public function Builds the settings.
GridStackEntityFormatterBase::create public static function
GridStackEntityFormatterBase::defaultSettings public static function
GridStackEntityFormatterBase::getScopedFormElements public function
GridStackEntityFormatterBase::viewElements public function
GridStackFormatterTrait::$formatter protected property The gridstack field formatter manager.
GridStackFormatterTrait::$loggerFactory protected property The logger factory.
GridStackFormatterTrait::$manager protected property The gridstack field formatter manager.
GridStackFormatterTrait::admin public function Returns the gridstack admin service shortcut.
GridStackFormatterTrait::blazyManager public function Overrides the blazy manager.
GridStackFormatterTrait::buildSettings public function Builds the settings. Aliased as: traitBuildSettings
GridStackFormatterTrait::formatter public function Returns the gridstack field formatter service.
GridStackFormatterTrait::getCommonFieldDefinition public function Defines the common scope for both front and admin.
GridStackFormatterTrait::getCommonScopedFormElements public function Defines the common scope for the form elements.
GridStackFormatterTrait::injectServices protected static function Injects DI services.
GridStackFormatterTrait::manager public function Returns the gridstack service.
GridStackFormatterTrait::settingsSummary public function
GridStackFormatterViewTrait::commonViewElements public function Returns similar view elements.
GridStackParagraphsFormatter::isApplicable public static function Overrides GridStackFormatterTrait::isApplicable