Version 1
[yaffs-website] / web / core / modules / system / tests / modules / entity_test_operation / entity_test_operation.module
diff --git a/web/core/modules/system/tests/modules/entity_test_operation/entity_test_operation.module b/web/core/modules/system/tests/modules/entity_test_operation/entity_test_operation.module
new file mode 100644 (file)
index 0000000..2b050ea
--- /dev/null
@@ -0,0 +1,22 @@
+<?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,
+    ],
+  ];
+}