diff --git a/core/modules/tour/src/Tests/TourTest.php b/core/modules/tour/src/Tests/TourTest.php index ab2fe4a0942c..78304c6e9570 100644 --- a/core/modules/tour/src/Tests/TourTest.php +++ b/core/modules/tour/src/Tests/TourTest.php @@ -145,7 +145,7 @@ class TourTest extends TourTestBasic { $this->drupalGet('tour-test-1'); // Load it back from the database and verify storage worked. - $entity_save_tip = entity_load('tour', 'tour-entity-create-test-en'); + $entity_save_tip = Tour::load('tour-entity-create-test-en'); // Verify that hook_ENTITY_TYPE_load() integration worked. $this->assertEqual($entity_save_tip->loaded, 'Load hooks work'); // Verify that hook_ENTITY_TYPE_presave() integration worked. diff --git a/core/modules/tour/tour.module b/core/modules/tour/tour.module index ed53f25dbc15..050eaa762333 100644 --- a/core/modules/tour/tour.module +++ b/core/modules/tour/tour.module @@ -6,6 +6,7 @@ */ use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\tour\Entity\Tour; /** * Implements hook_help(). @@ -85,7 +86,7 @@ function tour_page_bottom(array &$page_bottom) { $results = \Drupal::entityQuery('tour') ->condition('routes.*.route_name', $route_name) ->execute(); - if (!empty($results) && $tours = entity_load_multiple('tour', array_keys($results))) { + if (!empty($results) && $tours = Tour::loadMultiple(array_keys($results))) { foreach ($tours as $id => $tour) { // Match on params. if (!$tour->hasMatchingRoute($route_name, $route_match->getRawParameters()->all())) {