Exemple #1
0
 /**
  * @return ICollection|Addon[]
  */
 public function findMostPopular()
 {
     return $this->addonRepository->findOrdered('popularity')->limitBy(3);
 }
Exemple #2
0
 /**
  * @param string $tag
  * @return ICollection|Addon[]
  */
 public function findByTag($tag)
 {
     $collection = $this->addonRepository->findOrdered($this->search->by)->findBy(['this->tags->name' => $tag, 'state' => Addon::STATE_ACTIVE]);
     $collection = $this->formatLimit($collection);
     return $collection;
 }