Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
 /**
  * @param string $q
  */
 public function actionSearch($q)
 {
     $this->addons = $this->searchFacade->findByQuery($q);
 }