public function addRelated(ECommerceProduct $related) { if (!$this->related->contains($related)) { $this->related[] = $related; $related->addRelated($this); } }