function EntityTestOperationHooks::entityOperation
Same name and namespace in other branches
- 11.x core/modules/system/tests/modules/entity_test_operation/src/Hook/EntityTestOperationHooks.php \Drupal\entity_test_operation\Hook\EntityTestOperationHooks::entityOperation()
Implements hook_entity_operation().
Attributes
#[Hook('entity_operation')]
File
-
core/
modules/ system/ tests/ modules/ entity_test_operation/ src/ Hook/ EntityTestOperationHooks.php, line 22
Class
- EntityTestOperationHooks
- Hook implementations for entity_test_operation.
Namespace
Drupal\entity_test_operation\HookCode
public function entityOperation(EntityInterface $entity) : array {
return [
'test' => [
'title' => $this->t('Front page'),
'url' => Url::fromRoute('<front>'),
'weight' => 0,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.