Example #1
0
 /**
  * @return array
  */
 protected function getTags()
 {
     $tags = array();
     foreach ($this->tagRepository->getAll() as $tag) {
         $tags[$tag->id] = $tag->name;
     }
     return $tags;
 }
Example #2
0
 /**
  * @return array
  */
 public function getAll()
 {
     $tags = $this->tagRepository->getAll();
     $this->items[self::SECTION_ARTICLES] = $this->getItemsForSection(self::SECTION_ARTICLES, $tags, $this->articleRepository);
     $this->items[self::SECTION_IMAGES] = $this->getItemsForSection(self::SECTION_IMAGES, $tags, $this->imageRepository);
     $this->items[self::SECTION_VIDEOS] = $this->getItemsForSection(self::SECTION_VIDEOS, $tags, $this->videoRepository);
     $this->items[self::SECTION_GAMES] = $this->getItemsForSection(self::SECTION_GAMES, $tags, $this->wikiRepository, Entities\WikiEntity::TYPE_GAME);
     $this->items[self::SECTION_MOVIES] = $this->getItemsForSection(self::SECTION_MOVIES, $tags, $this->wikiRepository, Entities\WikiEntity::TYPE_MOVIE);
     $this->items[self::SECTION_BOOKS] = $this->getItemsForSection(self::SECTION_BOOKS, $tags, $this->wikiRepository, Entities\WikiEntity::TYPE_BOOK);
     return $this->items;
 }
Example #3
0
 /**
  * @param  string                  $tagSlug
  * @return Entities\TagEntity|null
  */
 protected function getTag($tagSlug)
 {
     return $tagSlug ? $this->tagRepository->getBySlug($tagSlug) : null;
 }