class LoadMultipleDeriver in Drupal 7 to 8/9 Module Upgrader 8
Builds derivative definitions for the _load_multiple plugin.
Hierarchy
- class \Drupal\drupalmoduleupgrader\DeriverBase implements ContainerDeriverInterface uses StringTranslationTrait
- class \Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions\LoadMultipleDeriver
Expanded class hierarchy of LoadMultipleDeriver
File
- src/
Plugin/ DMU/ Converter/ Functions/ LoadMultipleDeriver.php, line 10
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\FunctionsView source
class LoadMultipleDeriver extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_definition) {
$derivatives = [];
foreach ([
'node',
'user',
'comment',
'taxonomy_term',
] as $entity_type) {
$function = $entity_type . '_load_multiple';
$variables = [
'@function' => $function,
];
$derivative = $base_definition;
$derivative['function'] = $function;
$derivative['entity_type'] = $entity_type;
$derivative['message'] = $this
->t('`@function` is now `EntityStorageInterface::loadMultiple()`.', $variables);
$derivative['description'] = $this
->t('Rewrites calls to @function().', $variables);
$derivatives[$entity_type] = $derivative;
}
return $derivatives;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
public static | function |
Creates a new class instance. Overrides ContainerDeriverInterface:: |
3 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
DeriverBase:: |
public | function | 3 | |
LoadMultipleDeriver:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverInterface:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |