예제 #1
0
 /**
  * @param int $slug
  */
 public function actionDetail($slug)
 {
     $this->addon = $this->addonFacade->getById($slug);
     if (!$this->addon) {
         $this->error('Addon not found');
     }
 }
예제 #2
0
 /**
  * @return array
  */
 private function getUrls()
 {
     $urls = [];
     // Build static urls
     $urls[] = ['loc' => $this->presenter->link('//:Front:Home:default'), 'priority' => 1, 'change' => 'hourly'];
     $urls[] = ['loc' => $this->presenter->link('//:Front:List:default'), 'priority' => 0.9, 'change' => 'daily'];
     // Build owners urls
     foreach ($this->facade->findActiveOwners() as $addon) {
         $urls[] = ['loc' => $this->presenter->link('//:Front:List:owner', ['slug' => $addon->owner]), 'priority' => 0.6, 'change' => 'weekly'];
     }
     // Build addons urls
     foreach ($this->facade->findActive() as $addon) {
         $urls[] = ['loc' => $this->presenter->link('//:Front:Addon:detail', ['slug' => $addon->id]), 'priority' => 0.5, 'change' => 'weekly'];
     }
     return $urls;
 }