diff --git a/core/modules/tour/lib/Drupal/tour/Plugin/Core/Entity/Tour.php b/core/modules/tour/lib/Drupal/tour/Plugin/Core/Entity/Tour.php index 0154c84..4b8ac15 100644 --- a/core/modules/tour/lib/Drupal/tour/Plugin/Core/Entity/Tour.php +++ b/core/modules/tour/lib/Drupal/tour/Plugin/Core/Entity/Tour.php @@ -82,7 +82,7 @@ class Tour extends ConfigEntityBase implements TourInterface { public function __construct(array $values, $entity_type) { parent::__construct($values, $entity_type); - $this->tipsBag = new TipsBag(drupal_container()->get('plugin.manager.tour.tip'), $this->tips); + $this->tipsBag = new TipsBag(\Drupal::service('plugin.manager.tour.tip'), $this->tips); } /** diff --git a/core/modules/tour/tour.api.php b/core/modules/tour/tour.api.php index 2bda3d6..2f90d8f 100644 --- a/core/modules/tour/tour.api.php +++ b/core/modules/tour/tour.api.php @@ -72,7 +72,7 @@ function hook_tour_presave($entity) { * The tour object being inserted. */ function hook_tour_insert($entity) { - drupal_container()->get('plugin.manager.tour.tip')->clearCachedDefinitions(); + Drupal::service('plugin.manager.tour.tip')->clearCachedDefinitions(); cache('cache_tour')->deleteTags(array('tour_items')); } @@ -83,6 +83,6 @@ function hook_tour_insert($entity) { * The tour object being updated. */ function hook_tour_update($entity) { - drupal_container()->get('plugin.manager.tour.tip')->clearCachedDefinitions(); + Drupal::service('plugin.manager.tour.tip')->clearCachedDefinitions(); cache('cache_tour')->deleteTags(array('tour_items')); } diff --git a/core/modules/tour/tour.module b/core/modules/tour/tour.module index fe9bc1a..94935bc 100644 --- a/core/modules/tour/tour.module +++ b/core/modules/tour/tour.module @@ -116,7 +116,7 @@ function tour_preprocess_page(&$variables) { // Load all of the items and match on path. $tours = entity_load_multiple('tour'); - $path_alias = drupal_strtolower(drupal_container()->get('path.alias_manager')->getPathAlias($path)); + $path_alias = drupal_strtolower(Drupal::service('path.alias_manager')->getPathAlias($path)); foreach ($tours as $tour_id => $tour) { // @todo Replace this with an entity query that does path matching when // http://drupal.org/node/1918768 lands. @@ -135,12 +135,12 @@ function tour_preprocess_page(&$variables) { * Implements hook_tour_insert(). */ function tour_tour_insert($entity) { - drupal_container()->get('plugin.manager.tour.tip')->clearCachedDefinitions(); + Drupal::service('plugin.manager.tour.tip')->clearCachedDefinitions(); } /** * Implements hook_tour_update(). */ function tour_tour_update($entity) { - drupal_container()->get('plugin.manager.tour.tip')->clearCachedDefinitions(); + Drupal::service('plugin.manager.tour.tip')->clearCachedDefinitions(); }