summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-06-13 22:21:28 (GMT)
committer Alex Pott2013-06-13 22:21:28 (GMT)
commitd230ea6813cc3539e920865da275ae0dd84fbee9 (patch)
tree42fa8be8e77b8b262b5de21a1e8493006f9dfbb4
parent5a4dceb2fef5acb3f009f00690beb80fde1fc485 (diff)
Issue #1889748 by tim.plunkett: Figure out what to do with ConfigMapper.
-rw-r--r--core/lib/Drupal/Core/Plugin/Mapper/ConfigMapper.php56
1 files changed, 0 insertions, 56 deletions
diff --git a/core/lib/Drupal/Core/Plugin/Mapper/ConfigMapper.php b/core/lib/Drupal/Core/Plugin/Mapper/ConfigMapper.php
deleted file mode 100644
index decdf76..0000000
--- a/core/lib/Drupal/Core/Plugin/Mapper/ConfigMapper.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Core\Plugin\Mapper\ConfigMapper.
- */
-
-namespace Drupal\Core\Plugin\Mapper;
-
-use Drupal\Component\Plugin\Mapper\MapperInterface;
-use Drupal\Component\Plugin\PluginManagerInterface;
-use Drupal\Component\Plugin\Exception\PluginException;
-
-/**
- * Retrieves plugin instances from the configuration system.
- */
-class ConfigMapper implements MapperInterface {
-
- /**
- * The plugin manager instance used by this mapper.
- *
- * @var \Drupal\Component\Plugin\PluginManagerInterface
- */
- protected $manager;
-
- /**
- * Constructs a \Drupal\Core\Plugin\Mapper\ConfigMapper object.
- *
- * @param \Drupal\Component\Plugin\PluginManagerInterface $manager
- * The plugin manager instance to use for this mapper.
- */
- public function __construct(PluginManagerInterface $manager) {
- $this->manager = $manager;
- }
-
- /**
- * Implements \Drupal\Component\Plugin\Mapper\MapperInterface::getInstance().
- */
- public function getInstance(array $options) {
- $config = config($options['config']);
- if ($config) {
- $plugin_id = $config->get('id');
- $settings = $config->get();
- $settings['config_id'] = $options['config'];
- // Attempt to create an instance with this plugin ID and settings.
- try {
- return $this->manager->createInstance($plugin_id, $settings);
- }
- catch (PluginException $e) {
- return FALSE;
- }
- }
- return FALSE;
- }
-
-}