class DBDeriver in Drupal 7 to 8/9 Module Upgrader 8
Same name in this branch
- 8 src/Plugin/DMU/Analyzer/DBDeriver.php \Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\DBDeriver
- 8 src/Plugin/DMU/Converter/Functions/DBDeriver.php \Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions\DBDeriver
Builds derivative definitions for the _db plugin.
Hierarchy
- class \Drupal\drupalmoduleupgrader\DeriverBase implements ContainerDeriverInterface uses StringTranslationTrait
- class \Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions\DBDeriver
Expanded class hierarchy of DBDeriver
File
- src/
Plugin/ DMU/ Converter/ Functions/ DBDeriver.php, line 10
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\FunctionsView source
class DBDeriver extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_definition) {
$derivatives = [];
$functions = [
'db_select',
'db_insert',
'db_update',
'db_merge',
'db_delete',
'db_truncate',
];
foreach ($functions as $function) {
$variables = [
'@function' => $function,
];
$derivative = $base_definition;
$derivative['function'] = $function;
$derivative['description'] = $this
->t('Disables calls to @function() which refer to legacy tables.', $variables);
$derivatives[$function] = $derivative;
}
return $derivatives;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DBDeriver:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverInterface:: |
|
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 | |
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. |