--- 1970360-47-entity-uri.patch 2013-05-07 07:07:47.000000000 -0700 +++ 1970360-entity-uri-matt2000.patch 2013-05-25 14:45:56.572462706 -0700 @@ -1,8 +1,8 @@ diff --git a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php -index 30c8252..beaa4e3 100644 +index 30c8252..7768bc9 100644 --- a/core/lib/Drupal/Core/Entity/Annotation/EntityType.php +++ b/core/lib/Drupal/Core/Entity/Annotation/EntityType.php -@@ -253,6 +253,41 @@ class EntityType extends Plugin { +@@ -253,6 +253,37 @@ class EntityType extends Plugin { public $menu_path_wildcard; /** @@ -23,10 +23,6 @@ index 30c8252..beaa4e3 100644 + * - bundle: The bundle machine name of the entity. + * - id: The unique ID of the entity. + * - uuid: The UUID of the entity. -+ * - [entityType]: The entity type itself will also be a valid token for the -+ * ID of the entity. For instance, a placeholder of {node} used on the Node -+ * class would have the same value as {id}. This is generally preferred -+ * over "id" for better self-documentation. + * + * Specific entity types may also expand upon this list by overriding the + * uriPlaceholderReplacements() method. @@ -45,10 +41,10 @@ index 30c8252..beaa4e3 100644 * should use entity-type level granularity, bundle level granularity or just * skip this entity. The allowed values are respectively "entity_type", diff --git a/core/lib/Drupal/Core/Entity/EntityBCDecorator.php b/core/lib/Drupal/Core/Entity/EntityBCDecorator.php -index 9697648..a45b3b6 100644 +index ffb0e0c..6c8be21 100644 --- a/core/lib/Drupal/Core/Entity/EntityBCDecorator.php +++ b/core/lib/Drupal/Core/Entity/EntityBCDecorator.php -@@ -211,6 +211,13 @@ function __clone() { +@@ -213,6 +213,13 @@ function __clone() { /** * Forwards the call to the decorated entity. */ @@ -62,7 +58,7 @@ index 9697648..a45b3b6 100644 public function access($operation = 'view', \Drupal\user\Plugin\Core\Entity\User $account = NULL) { return $this->decorated->access($operation, $account); } -@@ -352,8 +359,8 @@ public function label($langcode = NULL) { +@@ -354,8 +361,8 @@ public function label($langcode = NULL) { /** * Forwards the call to the decorated entity. */ @@ -74,7 +70,7 @@ index 9697648..a45b3b6 100644 /** diff --git a/core/lib/Drupal/Core/Entity/EntityNG.php b/core/lib/Drupal/Core/Entity/EntityNG.php -index bbc3b84..1d740ad 100644 +index 6a93a59..ea2c262 100644 --- a/core/lib/Drupal/Core/Entity/EntityNG.php +++ b/core/lib/Drupal/Core/Entity/EntityNG.php @@ -74,6 +74,13 @@ class EntityNG extends Entity { @@ -165,25 +161,25 @@ index bbc3b84..1d740ad 100644 */ public function get($property_name) { diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php -index 059f516..f693637 100644 +index 55a1bd3..a291947 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php -@@ -40,6 +40,10 @@ +@@ -41,6 +41,10 @@ * "bundle" = "node_type", * "label" = "subject", * "uuid" = "uuid" + * }, + * links = { -+ * "canonical" = "/comment/{comment}", -+ * "edit-form" = "/comment/{comment}/edit" ++ * "canonical" = "/comment/{id}", ++ * "edit-form" = "/comment/{id}/edit" * } * ) */ diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php -index 6f2837a..3efe358 100644 +index 3636f91..9532099 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentThreadingTest.php -@@ -130,10 +130,10 @@ protected function assertParentLink($cid, $pid) { +@@ -132,10 +132,10 @@ protected function assertParentLink($cid, $pid) { // //
//

@@ -197,7 +193,7 @@ index 6f2837a..3efe358 100644 $this->assertFieldByXpath($pattern, NULL, format_string( 'Comment %cid has a link to parent %pid.', diff --git a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php -index 7a9ffa9..bfed089 100644 +index 7a9ffa9..af51e5f 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php +++ b/core/modules/node/lib/Drupal/node/Plugin/Core/Entity/Node.php @@ -45,7 +45,12 @@ @@ -207,18 +203,18 @@ index 7a9ffa9..bfed089 100644 - * permission_granularity = "bundle" + * permission_granularity = "bundle", + * links = { -+ * "canonical" = "/node/{node}", -+ * "edit-form" = "/node/{node}/edit", -+ * "version-history" = "/node/{node}/revisions" ++ * "canonical" = "/node/{id}", ++ * "edit-form" = "/node/{id}/edit", ++ * "version-history" = "/node/{id}/revisions" + * } * ) */ class Node extends EntityNG implements NodeInterface { diff --git a/core/modules/node/node.module b/core/modules/node/node.module -index 7ba5d23..a64a2bc 100644 +index 6d7b1c9..ced5e7e 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module -@@ -2182,10 +2182,15 @@ function node_page_view(EntityInterface $node) { +@@ -2160,10 +2160,15 @@ function node_page_view(EntityInterface $node) { // of the active trail, and the link name becomes the page title. // Thus, we must explicitly set the page title to be the node title. drupal_set_title($node->label()); @@ -266,7 +262,7 @@ index dbdba31..b0cb999 100644 // Comment type. $expected_value = array( diff --git a/core/modules/rdf/rdf.module b/core/modules/rdf/rdf.module -index a2f74a3..93b1722 100644 +index aaea6bb..535497a 100644 --- a/core/modules/rdf/rdf.module +++ b/core/modules/rdf/rdf.module @@ -419,7 +419,7 @@ function rdf_comment_load($comments) { @@ -279,16 +275,16 @@ index a2f74a3..93b1722 100644 } } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php -index 55c3e07..bff800d 100644 +index 28741ec..f18e9b7 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php -@@ -42,6 +42,10 @@ +@@ -43,6 +43,10 @@ * bundle_keys = { * "bundle" = "vid" * }, + * links = { -+ * "canonical" = "/taxonomy/term/{taxonomy_term}", -+ * "edit-form" = "/taxonomy/term/{taxonomy_term}/edit" ++ * "canonical" = "/taxonomy/term/{id}", ++ * "edit-form" = "/taxonomy/term/{id}/edit" + * }, * menu_base_path = "taxonomy/term/%taxonomy_term", * route_base_path = "admin/structure/taxonomy/manage/{bundle}",