コード例 #1
0
ファイル: TagPresenter.php プロジェクト: krupaj/my-blog
 /**
  * Vraci vsechny pouzite tagy
  * @return Model\Entities\Tag[]
  */
 public function getTags()
 {
     if (!isset($this->tags)) {
         $this->tags = $this->tagRepository->getAllTags();
     }
     return $this->tags;
 }
コード例 #2
0
ファイル: ArticlesPresenter.php プロジェクト: krupaj/my-blog
 /**
  * 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;
 }