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 28741ec..eaf7a1f 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 @@ -31,7 +31,6 @@ * "translation" = "Drupal\taxonomy\TermTranslationController" * }, * base_table = "taxonomy_term_data", - * uri_callback = "taxonomy_term_uri", * fieldable = TRUE, * translatable = TRUE, * entity_keys = { @@ -132,6 +131,20 @@ class Term extends EntityNG implements TermInterface { public function id() { return $this->get('tid')->value; } + + /** + * Implements Drupal\Core\Entity\EntityInterface::uri(). + */ + public function uri(){ + return array( + 'path' => 'taxonomy/term/' . $this->id(), + 'options' => array( + 'entity_type' => $this->entityType, + 'entity' => $this, + ), + ); + } + /** * Overides \Drupal\Core\Entity\EntityNG::init(). diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index c531daf..c480ec8 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -118,15 +118,6 @@ function taxonomy_entity_bundle_info() { } /** - * Entity URI callback. - */ -function taxonomy_term_uri($term) { - return array( - 'path' => 'taxonomy/term/' . $term->id(), - ); -} - -/** * Implements hook_field_extra_fields(). */ function taxonomy_field_extra_fields() {