entity_test_operation.module in Drupal 8
Same filename and directory in other branches
Contains hook implementations for Entity Operation Test Module.
File
core/modules/system/tests/modules/entity_test_operation/entity_test_operation.moduleView source
<?php
/**
* @file
* Contains hook implementations for Entity Operation Test Module.
*/
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Url;
/**
* Implements hook_entity_operation().
*/
function entity_test_operation_entity_operation(EntityInterface $entity) {
return [
'test' => [
'title' => t('Front page'),
'url' => Url::fromRoute('<front>'),
'weight' => 0,
],
];
}
Functions
Name | Description |
---|---|
entity_test_operation_entity_operation | Implements hook_entity_operation(). |