class CyclicGraphException in Subgroup (Graph) 1.0.x
An exception thrown when a potential cycle is detected in an acyclic graph.
Hierarchy
- class \Drupal\ggroup\Graph\CyclicGraphException extends \Drupal\ggroup\Graph\Exception
Expanded class hierarchy of CyclicGraphException
File
- src/
Graph/ CyclicGraphException.php, line 8
Namespace
Drupal\ggroup\GraphView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CyclicGraphException:: |
public | function | Constructs an CyclicGraphException. |