From 9f6500ce2994c371dc73f926d5753c989fff6036 Mon Sep 17 00:00:00 2001
From: Carlos Ospina <camoatech@2448054.no-reply.drupal.org>
Date: Wed, 29 Apr 2015 14:38:00 -0500
Subject: [PATCH] Changes to defaultpluginmanager

---
 core/lib/Drupal/Core/Plugin/DefaultPluginManager.php | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php b/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php
index 297f971..e4e05bd 100644
--- a/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php
+++ b/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php
@@ -271,7 +271,7 @@ protected function findDefinitions() {
       if (is_object($plugin_definition) && !($plugin_definition = (array) $plugin_definition)) {
         continue;
       }
-      if (isset($plugin_definition['provider']) && !in_array($plugin_definition['provider'], array('core', 'component')) && !$this->moduleHandler->moduleExists($plugin_definition['provider'])) {
+      if (isset($plugin_definition['provider']) && !in_array($plugin_definition['provider'], array('core', 'component')) && !$this->providerExists($plugin_definition['provider'])) {
         unset($definitions[$plugin_id]);
       }
     }
@@ -290,4 +290,14 @@ protected function alterDefinitions(&$definitions) {
     }
   }
 
+  /**
+   * Determines if the provider of a definition exists.
+   *
+   * @return boolean
+   *   TRUE if provider exists, FALSE otherwise.
+   */
+  protected function providerExists($provider) {
+    return $this->moduleHandler->moduleExists($provider);
+  }
+
 }
-- 
2.3.2 (Apple Git-55)

