module/FzyCommon/src/FzyCommon/Entity/Base.php
public function addSelfTo(\Doctrine\Common\Collections\Collection $collection, $allowDuplicates = false)
    {
        if ($allowDuplicates || !$collection->contains($this)) {
            $collection->add($this);
        }

        return $this;
    }
public function addSelfTo(\Doctrine\Common\Collections\Collection $collection, $allowDuplicates = false)
    {
        if ($allowDuplicates || !$collection->contains($this)) {
            $collection->add($this);
        }

        return $this;
    }
Adds $this to collection
@param  \Doctrine\Common\Collections\Collection $collection
@return mixed