Example #1
0
 /**
  * @param string $q
  */
 public function actionSuggest($q)
 {
     $output = [];
     $addons = $this->searchFacade->findByQuery($q)->orderBy('this->github->downloads', 'DESC');
     foreach ($addons as $addon) {
         $output[] = ['id' => $addon->id, 'name' => $addon->github->name, 'description' => $addon->github->description, 'link' => $this->link(':Front:Addon:detail', $addon->id), 'stars' => $addon->github->stars, 'downloads' => $addon->github->downloads];
     }
     $this->sendJson($output);
 }
Example #2
0
 /**
  * @param string $tag
  */
 public function actionTag($tag)
 {
     $this->addons = $this->searchFacade->findByTag($tag);
 }