function ContentModerationStateFormatter::create

Same name in other branches
  1. 8.9.x core/modules/content_moderation/src/Plugin/Field/FieldFormatter/ContentModerationStateFormatter.php \Drupal\content_moderation\Plugin\Field\FieldFormatter\ContentModerationStateFormatter::create()
  2. 10 core/modules/content_moderation/src/Plugin/Field/FieldFormatter/ContentModerationStateFormatter.php \Drupal\content_moderation\Plugin\Field\FieldFormatter\ContentModerationStateFormatter::create()
  3. 11.x core/modules/content_moderation/src/Plugin/Field/FieldFormatter/ContentModerationStateFormatter.php \Drupal\content_moderation\Plugin\Field\FieldFormatter\ContentModerationStateFormatter::create()

Overrides FormatterBase::create

File

core/modules/content_moderation/src/Plugin/Field/FieldFormatter/ContentModerationStateFormatter.php, line 42

Class

ContentModerationStateFormatter
Plugin implementation of the 'content_moderation_state' formatter.

Namespace

Drupal\content_moderation\Plugin\Field\FieldFormatter

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($plugin_id, $plugin_definition, $configuration['field_definition'], $configuration['settings'], $configuration['label'], $configuration['view_mode'], $configuration['third_party_settings'], $container->get('content_moderation.moderation_information'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.