You are here

public function CyclicGraphException::__construct in Subgroup (Graph) 1.0.x

Constructs an CyclicGraphException.

Parameters

int|string $parent: The parent group ID or name.

int|string $child: The child group ID or name.

File

src/Graph/CyclicGraphException.php, line 18

Class

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

Namespace

Drupal\ggroup\Graph

Code

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.");
}