function data_policy_entity_operation in Data Policy 8
Implements hook_entity_operation().
File
- ./
data_policy.module, line 168 - data_policy.module
Code
function data_policy_entity_operation(EntityInterface $entity) {
$operations = [];
if ($entity
->getEntityTypeId() === 'data_policy') {
$operations['revisions'] = [
'title' => t('Revisions'),
'weight' => 1,
'url' => $entity
->toUrl('version-history')
->setRouteParameter('entity_id', $entity
->id()),
];
}
return $operations;
}