public function getPhotoTags($photoId) { $list = $this->tagService->findEntityTags($photoId, self::ENTITY_PHOTO); $out = array(); foreach ($list as $tag) { /*@var $tag BOL_Tag */ $out[] = array("id" => $tag->id, "text" => $tag->label, "count" => null); } return $out; }