private function Blocks::addFixMe in Drupal 7 to 8/9 Module Upgrader 8
Slaps a translated FIXME notice above a block-related hook.
Parameters
\Drupal\drupalmoduleupgrader\TargetInterface $target: The target module.
string $hook: The hook to put the FIXME on. It's up to the calling code to ensure that the hook actually exists.
1 call to Blocks::addFixMe()
- Blocks::convert in src/
Plugin/ DMU/ Converter/ Blocks.php - Performs required conversions.
File
- src/
Plugin/ DMU/ Converter/ Blocks.php, line 89
Class
- Blocks
- Plugin annotation @Converter( id = "blocks", description = @Translation("Converts Drupal 7 blocks to plugins."), hook = { "hook_block_configure", "hook_block_info", "hook_block_save", "hook_block_view" }, fixme =…
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\ConverterCode
private function addFixMe(TargetInterface $target, $hook) {
$variables = [
'@hook' => $hook,
];
$function = $target
->getIndexer('function')
->get('hook_' . $hook)
->setDocComment($this
->buildFixMe(NULL, $variables, self::DOC_COMMENT));
$target
->save($function);
}