From cedf8d3f4accfac8c503ba4d084e34088bf3366c Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Wed, 27 Feb 2013 20:44:36 -0500 Subject: [PATCH] Issue #1925576 by yched: Fix TourManager naming convention. --- core/modules/tour/lib/Drupal/tour/Plugin/Core/Entity/Tour.php | 2 +- core/modules/tour/lib/Drupal/tour/Tests/TourPluginTest.php | 4 ++-- .../lib/Drupal/tour/{TourManager.php => TipPluginManager.php} | 4 ++-- core/modules/tour/lib/Drupal/tour/TourBundle.php | 2 +- core/modules/tour/tour.api.php | 4 ++-- core/modules/tour/tour.module | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) rename core/modules/tour/lib/Drupal/tour/{TourManager.php => TipPluginManager.php} (94%) 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 89a7e76bd5a0..aa0107d6166c 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 @@ -74,7 +74,7 @@ class Tour extends ConfigEntityBase { public function __construct(array $values, $entity_type) { parent::__construct($values, $entity_type); - $this->tipsBag = new TipsBag(drupal_container()->get('plugin.manager.tour'), $this->tips); + $this->tipsBag = new TipsBag(drupal_container()->get('plugin.manager.tour.tip'), $this->tips); } /** diff --git a/core/modules/tour/lib/Drupal/tour/Tests/TourPluginTest.php b/core/modules/tour/lib/Drupal/tour/Tests/TourPluginTest.php index 8256eed04a4a..460e4978e1c7 100644 --- a/core/modules/tour/lib/Drupal/tour/Tests/TourPluginTest.php +++ b/core/modules/tour/lib/Drupal/tour/Tests/TourPluginTest.php @@ -24,7 +24,7 @@ class TourPluginTest extends DrupalUnitTestBase { /** * Stores the tour plugin manager. * - * @var \Drupal\tour\TourManager + * @var \Drupal\tour\TipPluginManager */ protected $pluginManager; @@ -40,7 +40,7 @@ protected function setUp() { parent::setUp(); config_install_default_config('module', 'tour'); - $this->pluginManager = $this->container->get('plugin.manager.tour'); + $this->pluginManager = $this->container->get('plugin.manager.tour.tip'); } /** diff --git a/core/modules/tour/lib/Drupal/tour/TourManager.php b/core/modules/tour/lib/Drupal/tour/TipPluginManager.php similarity index 94% rename from core/modules/tour/lib/Drupal/tour/TourManager.php rename to core/modules/tour/lib/Drupal/tour/TipPluginManager.php index ee44c9bc1148..19732c1f2007 100644 --- a/core/modules/tour/lib/Drupal/tour/TourManager.php +++ b/core/modules/tour/lib/Drupal/tour/TipPluginManager.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\tour\TourManager. + * Contains \Drupal\tour\TipPluginManager. */ namespace Drupal\tour; @@ -16,7 +16,7 @@ /** * Configurable tour manager. */ -class TourManager extends PluginManagerBase { +class TipPluginManager extends PluginManagerBase { /** * Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct(). diff --git a/core/modules/tour/lib/Drupal/tour/TourBundle.php b/core/modules/tour/lib/Drupal/tour/TourBundle.php index 337a6720e284..6839645ae63c 100644 --- a/core/modules/tour/lib/Drupal/tour/TourBundle.php +++ b/core/modules/tour/lib/Drupal/tour/TourBundle.php @@ -21,6 +21,6 @@ class TourBundle extends Bundle { public function build(ContainerBuilder $container) { // Register the plugin manager for our plugin type with the dependency // injection container. - $container->register('plugin.manager.tour', 'Drupal\tour\TourManager'); + $container->register('plugin.manager.tour.tip', 'Drupal\tour\TipPluginManager'); } } diff --git a/core/modules/tour/tour.api.php b/core/modules/tour/tour.api.php index a3672b364822..548622e4f046 100644 --- a/core/modules/tour/tour.api.php +++ b/core/modules/tour/tour.api.php @@ -57,7 +57,7 @@ function hook_tour_presave($entity) { * The tour object being inserted. */ function hook_tour_insert($entity) { - drupal_container()->get('plugin.manager.tour')->clearCachedDefinitions(); + drupal_container()->get('plugin.manager.tour.tip')->clearCachedDefinitions(); cache('cache_tour')->deleteTags(array('tour_items')); } @@ -68,6 +68,6 @@ function hook_tour_insert($entity) { * The tour object being updated. */ function hook_tour_update($entity) { - drupal_container()->get('plugin.manager.tour')->clearCachedDefinitions(); + drupal_container()->get('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 7c1e1d6138d5..f26b356d3e18 100644 --- a/core/modules/tour/tour.module +++ b/core/modules/tour/tour.module @@ -204,12 +204,12 @@ function tour_preprocess_page(&$variables) { * Implements hook_tour_insert(). */ function tour_tour_insert($entity) { - drupal_container()->get('plugin.manager.tour')->clearCachedDefinitions(); + drupal_container()->get('plugin.manager.tour.tip')->clearCachedDefinitions(); } /** * Implements hook_tour_update(). */ function tour_tour_update($entity) { - drupal_container()->get('plugin.manager.tour')->clearCachedDefinitions(); + drupal_container()->get('plugin.manager.tour.tip')->clearCachedDefinitions(); } -- GitLab