You are here

public static function DeriverBase::create in Drupal 7 to 8/9 Module Upgrader 8

Creates a new class instance.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the fetcher.

string $base_plugin_id: The base plugin ID for the plugin ID.

Return value

static Returns an instance of this fetcher.

Overrides ContainerDeriverInterface::create

3 methods override DeriverBase::create()
EntityOperationDeriver::create in src/Plugin/DMU/Converter/Functions/EntityOperationDeriver.php
Creates a new class instance.
FlagHookDeriver::create in src/Plugin/DMU/Analyzer/FlagHookDeriver.php
Creates a new class instance.
FunctionCallDeriver::create in src/Plugin/DMU/Analyzer/FunctionCallDeriver.php
Creates a new class instance.

File

src/DeriverBase.php, line 25

Class

DeriverBase
Base class for DMU's plugin derivers. Sets up the translation service and provides a basic implementation of DeriverInterface::getDerivativeDefinition().

Namespace

Drupal\drupalmoduleupgrader

Code

public static function create(ContainerInterface $container, $base_plugin_id) {
  return new static($container
    ->get('string_translation'));
}