You are here

public static function EntityReferenceRevisionsExportFormatter::create in REST Views 2.0.x

Same name and namespace in other branches
  1. 8 modules/rest_views_revisions/src/Plugin/Field/FieldFormatter/EntityReferenceRevisionsExportFormatter.php \Drupal\rest_views_revisions\Plugin\Field\FieldFormatter\EntityReferenceRevisionsExportFormatter::create()

Throws

\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException

\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException

Overrides EntityReferenceEntityFormatter::create

File

modules/rest_views_revisions/src/Plugin/Field/FieldFormatter/EntityReferenceRevisionsExportFormatter.php, line 91

Class

EntityReferenceRevisionsExportFormatter
Bridge plugin integrating entity_reference_revisions with rest_views.

Namespace

Drupal\rest_views_revisions\Plugin\Field\FieldFormatter

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {

  // Instantiate the entity_reference_revisions formatter.
  $entityFormatter = ERFEntityFormatter::create($container, $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('logger.factory'), $container
    ->get('entity_type.manager'), $container
    ->get('entity_display.repository'), $entityFormatter);
}