Commit 4bc14c72 authored by catch's avatar catch

Issue #2723631 by pbuyle, John Cook, valthebald, Mile23: Remove entity_load*...

Issue #2723631 by pbuyle, John Cook, valthebald, Mile23: Remove entity_load* usage for tour entity type
parent 899cb523
......@@ -145,7 +145,7 @@ public function testTourFunctionality() {
$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.
......
......@@ -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())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment