summaryrefslogtreecommitdiffstats
path: root/core/modules/content_moderation/src/Entity
diff options
context:
space:
mode:
authorAlex Pott2016-09-22 14:23:33 (GMT)
committerAlex Pott2016-09-22 14:23:33 (GMT)
commitaef08f50f3268fd036ed07b7b8b9b6a3351fe4b4 (patch)
treefb7b674a162d7cced24333c98ad222052eae6c5b /core/modules/content_moderation/src/Entity
parent57d9909de534462cd2453b111e99085fad5f54aa (diff)
Issue #2802301 by tstoeckler: Use route providers for ModerationState(|Transition)
Diffstat (limited to 'core/modules/content_moderation/src/Entity')
-rw-r--r--core/modules/content_moderation/src/Entity/ModerationState.php7
-rw-r--r--core/modules/content_moderation/src/Entity/ModerationStateTransition.php6
2 files changed, 11 insertions, 2 deletions
diff --git a/core/modules/content_moderation/src/Entity/ModerationState.php b/core/modules/content_moderation/src/Entity/ModerationState.php
index 0522e7d..379ff60 100644
--- a/core/modules/content_moderation/src/Entity/ModerationState.php
+++ b/core/modules/content_moderation/src/Entity/ModerationState.php
@@ -19,8 +19,12 @@ use Drupal\content_moderation\ModerationStateInterface;
* "edit" = "Drupal\content_moderation\Form\ModerationStateForm",
* "delete" = "Drupal\content_moderation\Form\ModerationStateDeleteForm"
* },
+ * "route_provider" = {
+ * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider",
+ * },
* },
* config_prefix = "state",
+ * admin_permission = "administer moderation states",
* entity_keys = {
* "id" = "id",
* "label" = "label",
@@ -28,7 +32,8 @@ use Drupal\content_moderation\ModerationStateInterface;
* "weight" = "weight",
* },
* links = {
- * "edit-form" = "/admin/config/workflow/moderation/states/{moderation_state}/edit",
+ * "add-form" = "/admin/config/workflow/moderation/states/add",
+ * "edit-form" = "/admin/config/workflow/moderation/states/{moderation_state}",
* "delete-form" = "/admin/config/workflow/moderation/states/{moderation_state}/delete",
* "collection" = "/admin/config/workflow/moderation/states"
* },
diff --git a/core/modules/content_moderation/src/Entity/ModerationStateTransition.php b/core/modules/content_moderation/src/Entity/ModerationStateTransition.php
index 99dbf93..95a115b 100644
--- a/core/modules/content_moderation/src/Entity/ModerationStateTransition.php
+++ b/core/modules/content_moderation/src/Entity/ModerationStateTransition.php
@@ -18,6 +18,9 @@ use Drupal\content_moderation\ModerationStateTransitionInterface;
* "edit" = "Drupal\content_moderation\Form\ModerationStateTransitionForm",
* "delete" = "Drupal\content_moderation\Form\ModerationStateTransitionDeleteForm"
* },
+ * "route_provider" = {
+ * "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider",
+ * },
* },
* config_prefix = "state_transition",
* admin_permission = "administer moderation state transitions",
@@ -28,7 +31,8 @@ use Drupal\content_moderation\ModerationStateTransitionInterface;
* "weight" = "weight"
* },
* links = {
- * "edit-form" = "/admin/config/workflow/moderation/transitions/{moderation_state_transition}/edit",
+ * "add-form" = "/admin/config/workflow/moderation/transitions/add",
+ * "edit-form" = "/admin/config/workflow/moderation/transitions/{moderation_state_transition}",
* "delete-form" = "/admin/config/workflow/moderation/transitions/{moderation_state_transition}/delete",
* "collection" = "/admin/config/workflow/moderation/transitions"
* }