You are here

public static function Update400::create in Lightning Media 8.4

Same name in this branch
  1. 8.4 src/Update/Update400.php \Drupal\lightning_media\Update\Update400::create()
  2. 8.4 modules/lightning_media_document/src/Update/Update400.php \Drupal\lightning_media_document\Update\Update400::create()

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 ContainerInjectionInterface::create

File

modules/lightning_media_document/src/Update/Update400.php, line 50

Class

Update400
Contains configuration updates targeting Lightning Media Document 4.0.0.

Namespace

Drupal\lightning_media_document\Update

Code

public static function create(ContainerInterface $container) {
  $entity_type_manager = $container
    ->get('entity_type.manager');
  return new static($entity_type_manager
    ->getStorage('field_config'), $entity_type_manager
    ->getStorage('media_type'));
}