function conditional_fields_entity_operation in Conditional Fields 4.x
Same name and namespace in other branches
- 8 conditional_fields.module \conditional_fields_entity_operation()
Implements hook_entity_operation().
File
- ./
conditional_fields.module, line 54 - Contains conditional_fields.module.
Code
function conditional_fields_entity_operation(EntityInterface $entity) {
$operations = [];
if ($entity
->getEntityTypeId() == 'node_type') {
$operations['dependencies'] = [
'title' => t('Dependencies'),
'url' => Url::fromRoute('conditional_fields.tab.node', [
$entity
->getEntityTypeId() => $entity
->id(),
]),
'weight' => 29,
];
}
return $operations;
}