Version 1
[yaffs-website] / web / modules / contrib / devel / tests / modules / devel_entity_test / src / Plugin / Derivative / DevelEntityTestLocalTasks.php
diff --git a/web/modules/contrib/devel/tests/modules/devel_entity_test/src/Plugin/Derivative/DevelEntityTestLocalTasks.php b/web/modules/contrib/devel/tests/modules/devel_entity_test/src/Plugin/Derivative/DevelEntityTestLocalTasks.php
new file mode 100644 (file)
index 0000000..000710a
--- /dev/null
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\devel_entity_test\Plugin\Derivative;
+
+use Drupal\Component\Plugin\Derivative\DeriverBase;
+
+/**
+ * Defines the local tasks for all the entity_test entities.
+ */
+class DevelEntityTestLocalTasks extends DeriverBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getDerivativeDefinitions($base_plugin_definition) {
+    $this->derivatives = array();
+
+    $this->derivatives['devel_entity_test_canonical.canonical'] = array();
+    $this->derivatives['devel_entity_test_canonical.canonical']['base_route'] = "entity.devel_entity_test_canonical.canonical";
+    $this->derivatives['devel_entity_test_canonical.canonical']['route_name'] = "entity.devel_entity_test_canonical.canonical";
+    $this->derivatives['devel_entity_test_canonical.canonical']['title'] = 'View';
+
+    $this->derivatives['devel_entity_test_edit.edit'] = array();
+    $this->derivatives['devel_entity_test_edit.edit']['base_route'] = "entity.devel_entity_test_edit.edit_form";
+    $this->derivatives['devel_entity_test_edit.edit']['route_name'] = "entity.devel_entity_test_edit.edit_form";
+    $this->derivatives['devel_entity_test_edit.edit']['title'] = 'Edit';
+
+    return parent::getDerivativeDefinitions($base_plugin_definition);
+  }
+
+}