Skip to content
Snippets Groups Projects
Commit cedf8d3f authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1925576 by yched: Fix TourManager naming convention.

parent b09eb89f
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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);
}
/**
......
......@@ -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');
}
/**
......
......@@ -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().
......
......@@ -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');
}
}
......@@ -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'));
}
......@@ -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();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment