function views_revisions_entity_operation_alter in Config Entity Revisions 8
Same name and namespace in other branches
- 1.x modules/views_revisions/views_revisions.module \views_revisions_entity_operation_alter()
Implements hook_entity_operation_alter().
File
- modules/
views_revisions/ views_revisions.module, line 164
Code
function views_revisions_entity_operation_alter(array &$operations, \Drupal\Core\Entity\EntityInterface $entity) {
if ($entity
->access('revisions') && $entity
->hasLinkTemplate('revisions')) {
$operations['revisions'] = [
'title' => t('Revisions'),
'weight' => 100,
'url' => $entity
->toUrl('revisions'),
];
}
}