/** * Vraci vsechny pouzite tagy * @return Model\Entities\Tag[] */ public function getTags() { if (!isset($this->tags)) { $this->tags = $this->tagRepository->getAllTags(); } return $this->tags; }
/** * Vraci dostupne tagy * @return array */ protected function getTags() { $result = []; $tags = $this->tagRepository->getAllTags(); foreach ($tags as $tag) { /** @var $tag Model\Entities\Tag */ $result[$tag->getId()] = $tag->getTitle(); } return $result; }