function bibcite_entity_entity_operation in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/bibcite_entity.module \bibcite_entity_entity_operation()
Implements hook_entity_operation().
File
- modules/
bibcite_entity/ bibcite_entity.module, line 48 - Module hooks.
Code
function bibcite_entity_entity_operation(EntityInterface $entity) {
$operations = [];
if ($entity
->hasLinkTemplate('bibcite-merge-form')) {
$operations['bibcite_merge'] = [
'title' => t('Merge'),
'weight' => 10,
'url' => $entity
->toUrl('bibcite-merge-form'),
];
}
return $operations;
}