Entity/Component.php
public function addElement(ComponentHasElement $elements)
    {
        $elements->setComponent($this);
        $this->elements[] = $elements;

        return $this;
    }
public function addElement(ComponentHasElement $elements)
    {
        $elements->setComponent($this);
        $this->elements[] = $elements;

        return $this;
    }
Add elements

@param ComponentHasElement $elements
@return Component