You are here

public static function DiffController::create in Entity Share 8.2

Instantiates a new instance of this class.

This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.

Overrides PluginRevisionController::create

File

modules/entity_share_client/src/Controller/DiffController.php, line 66

Class

DiffController
Returns responses for Diff support routes.

Namespace

Drupal\entity_share_client\Controller

Code

public static function create(ContainerInterface $container) {
  $instance = parent::create($container);
  $instance->remoteManager = $container
    ->get('entity_share_client.remote_manager');
  $instance->requestService = $container
    ->get('entity_share_client.request');
  $instance->jsonapiHelper = $container
    ->get('entity_share_client.jsonapi_helper');
  $instance->routeMatch = $container
    ->get('current_route_match');
  $instance->dateFormatter = $container
    ->get('date.formatter');
  $instance->resourceTypeRepository = $container
    ->get('jsonapi.resource_type.repository');
  return $instance;
}