You are here

public static function Update350::create in Lightning Media 8.4

Same name in this branch
  1. 8.4 modules/lightning_media_audio/src/Update/Update350.php \Drupal\lightning_media_audio\Update\Update350::create()
  2. 8.4 modules/lightning_media_video/src/Update/Update350.php \Drupal\lightning_media_video\Update\Update350::create()
Same name and namespace in other branches
  1. 8.3 modules/lightning_media_video/src/Update/Update350.php \Drupal\lightning_media_video\Update\Update350::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

1 call to Update350::create()
Update350Test::test in modules/lightning_media_video/tests/src/Kernel/Update350Test.php
@covers ::removeVideoFileLibraryFieldTranslatability @covers ::removeVideoLibraryFieldTranslatability

File

modules/lightning_media_video/src/Update/Update350.php, line 58

Class

Update350
Contains optional updates targeting Lightning Media Video 3.5.0.

Namespace

Drupal\lightning_media_video\Update

Code

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