src/Element/TaskBarIcon.php
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