public function addChild(ElementInterface $child)
    {
        if ($child instanceof Menu) {
            $this->element->setMenu($child);
        }

        $this->children[] = $child;
    }
public function addChild(ElementInterface $child)
    {
        if ($child instanceof Menu) {
            $this->element->setMenu($child);
        }

        $this->children[] = $child;
    }
public function addChild ( ElementInterface $ child ) { if ( $ child instanceof Menu ) { $ this -> element -> setMenu ( $ child ) ; } $ this -> children [ ] = $ child ; }
Add a child element

@param ElementInterface $child
Add a child element