public function addChild(GroupInterface $child)
    {
        if ($this->children->contains($child)) {
            throw new \InvalidArgumentException('This entity is already a child of this group');
        }

        $this->children->add($child);
    }
public function addChild(GroupInterface $child)
    {
        if ($this->children->contains($child)) {
            throw new \InvalidArgumentException('This entity is already a child of this group');
        }

        $this->children->add($child);
    }
public function addChild ( GroupInterface $ child ) { if ( $ this -> children -> contains ( $ child ) ) { throw new \ InvalidArgumentException ( 'This entity is already a child of this group' ) ; } $ this -> children -> add ( $ child ) ; }
Add a child group to the collection.

@param GroupInterface $child
Add a child group to the collection .