Issue #1925576 by yched: Fix TourManager naming convention.

8.0.x
webchick 2013-02-27 20:44:36 -05:00
parent b09eb89f27
commit cedf8d3f4a
6 changed files with 10 additions and 10 deletions

View File

@ -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);
}
/**

View File

@ -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 @@ class TourPluginTest extends DrupalUnitTestBase {
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');
}
/**

View File

@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\tour\TourManager.
* Contains \Drupal\tour\TipPluginManager.
*/
namespace Drupal\tour;
@ -16,7 +16,7 @@ use Drupal\Component\Plugin\Discovery\ProcessDecorator;
/**
* Configurable tour manager.
*/
class TourManager extends PluginManagerBase {
class TipPluginManager extends PluginManagerBase {
/**
* Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct().

View File

@ -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');
}
}

View File

@ -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'));
}

View File

@ -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();
}