function EntityTestOperationHooks::entityOperation
Implements hook_entity_operation().
File
-
core/
modules/ system/ tests/ modules/ entity_test_operation/ src/ Hook/ EntityTestOperationHooks.php, line 19
Class
- EntityTestOperationHooks
- Hook implementations for entity_test_operation.
Namespace
Drupal\entity_test_operation\HookCode
public function entityOperation(EntityInterface $entity) : array {
return [
'test' => [
'title' => 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.