public function addArticle(Article $article) { if (!$this->articles->contains($article)) { $article->setFeed($this); $this->articles->add($article); } }
/** {@inheritDoc} */ public function contains($element) { $this->initialize(); return $this->collection->contains($element); }
/** * Add variantChildren * * @param Page $variantChildren * * @return Page */ public function addVariantChild(Page $variantChildren) { if (!$this->variantChildren->contains($variantChildren)) { $this->variantChildren[] = $variantChildren; } return $this; }
/** * {@inheritDoc} */ public function getGenes() { $genes = new ArrayCollection(); foreach ($this->getmRNAs() as $mRNA) { foreach ($mRNA->getGenes() as $gene) { if (!$genes->contains($gene) && (!$mRNA->isPolycistronic() || $this->getOrigin() == $gene)) { $genes->add($gene); } } } }
/** * Add state * * @param IssueState $state */ public function addState(IssueState $state) { if (!$this->states->contains($state)) { $this->states->add($state); } }
public function isFollowing(User $user) { return $this->following->contains($user); }