public function DBDeriver::getDerivativeDefinitions 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::getDerivativeDefinitions()
- 8 src/Plugin/DMU/Converter/Functions/DBDeriver.php \Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions\DBDeriver::getDerivativeDefinitions()
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: The definition array of the base plugin.
Return value
array An array of full derivative definitions keyed on derivative id.
Overrides DeriverInterface::getDerivativeDefinitions
See also
getDerivativeDefinition()
File
- src/
Plugin/ DMU/ Analyzer/ DBDeriver.php, line 15
Class
- DBDeriver
- Builds derivative definitions for the _db plugin.
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\AnalyzerCode
public function getDerivativeDefinitions($base_definition) {
$derivatives = [];
$functions = [
'db_select',
'db_insert',
'db_update',
'db_merge',
'db_truncate',
];
foreach ($functions as $function) {
$derivative = $base_definition;
$derivative['function'] = $function;
$derivative['description'] = $this
->t('Checks for calls to @function() that refer to legacy tables.', [
'@function' => $function,
]);
$derivatives[$function] = $derivative;
}
return $derivatives;
}