From 48ccc244691796a5303531d9a9ac7b3b148b3ae8 Mon Sep 17 00:00:00 2001
From: M Parker <mparker17@536298.no-reply.drupal.org>
Date: Sat, 3 Sep 2016 20:03:52 -0400
Subject: [PATCH] 2724835-18

---
 .../Core/Config/Entity/ConfigDependencyManager.php | 26 ++++++++++++++++------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php
index ef522ad..ee29e18 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php
@@ -136,18 +136,30 @@ class ConfigDependencyManager {
   protected $graph;
 
   /**
-   * Gets dependencies.
+   * Return config entity ancestors, ordered from the immediate parent upwards.
+   *
+   * Given a configuration name and type, returns a list of
+   * ConfigEntityDependency objects in the order of the nearest to the entity
+   * passed in. For example, if passed ('module', 'node'), this function will
+   * return [node_type, field_storage, field, entity view displays].
+   *
+   * If the given entity isn't a configuration, module, theme or content entity
+   * then this function returns just an empty array.
    *
    * @param string $type
-   *   The type of dependency being checked. Either 'module', 'theme', 'config'
-   *   or 'content'.
+   *   The type of dependency being checked. Either 'module', 'theme', 'config'.
+   *
    * @param string $name
-   *   The specific name to check. If $type equals 'module' or 'theme' then it
-   *   should be a module name or theme name. In the case of entity it should be
-   *   the full configuration object name.
+   *   The specific configuration name to check. If $type equals 'module' or
+   *   'theme' then it should be a module name or theme name. Otherwise it
+   *   should be the full configuration object name.
    *
    * @return \Drupal\Core\Config\Entity\ConfigEntityDependency[]
-   *   An array of config entity dependency objects that are dependent.
+   *   An array of configuration entities which depend on the given entity,
+   *   ordered from the immediate parent up the dependency graph.
+   *   Returns an empty array If there are no ancestors.
+   *
+   * @see \Drupal\Core\Entity\EntityInterface::getConfigDependencyName()
    */
   public function getDependentEntities($type, $name) {
     $dependent_entities = array();
-- 
2.9.3

