Example #1
0
 public function addArticle(Article $article)
 {
     if (!$this->articles->contains($article)) {
         $article->setFeed($this);
         $this->articles->add($article);
     }
 }
Example #2
0
 /** {@inheritDoc} */
 public function contains($element)
 {
     $this->initialize();
     return $this->collection->contains($element);
 }
Example #3
0
 /**
  * Add variantChildren
  *
  * @param Page $variantChildren
  *
  * @return Page
  */
 public function addVariantChild(Page $variantChildren)
 {
     if (!$this->variantChildren->contains($variantChildren)) {
         $this->variantChildren[] = $variantChildren;
     }
     return $this;
 }
Example #4
0
 /**
  * {@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);
             }
         }
     }
 }
Example #5
0
 /**
  * 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);
 }