Version 1
[yaffs-website] / web / core / modules / system / tests / modules / entity_test_operation / entity_test_operation.module
1 <?php
2
3 /**
4  * @file
5  * Contains hook implementations for Entity Operation Test Module.
6  */
7
8 use Drupal\Core\Entity\EntityInterface;
9 use Drupal\Core\Url;
10
11 /**
12  * Implements hook_entity_operation().
13  */
14 function entity_test_operation_entity_operation(EntityInterface $entity) {
15   return [
16     'test' => [
17       'title' => t('Front page'),
18       'url' => Url::fromRoute('<front>'),
19       'weight' => 0,
20     ],
21   ];
22 }