You are here

class CyclicGraphException in Subgroup (Graph) 1.0.x

An exception thrown when a potential cycle is detected in an acyclic graph.

Hierarchy

Expanded class hierarchy of CyclicGraphException

File

src/Graph/CyclicGraphException.php, line 8

Namespace

Drupal\ggroup\Graph
View source
class CyclicGraphException extends \Exception {

  /**
   * Constructs an CyclicGraphException.
   *
   * @param int|string $parent
   *   The parent group ID or name.
   * @param int|string $child
   *   The child group ID or name.
   */
  public function __construct($parent, $child) {
    parent::__construct("Cannot add group '{$child}' as a subgroup of group '{$parent}' because group '{$parent}' is already a descendant subgroup of group '{$child}'. Cyclic relationships cannot be handled.");
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CyclicGraphException::__construct public function Constructs an CyclicGraphException.