/** * Finds list of tagged clips * * @param string $tag * @param int $page * @param int $limit * @return array of VIDEO_BOL_Clip */ public function findTaggedClipsList($tag, $page, $limit) { $first = ($page - 1) * $limit; $clipIdList = BOL_TagService::getInstance()->findEntityListByTag('video', $tag, $first, $limit); $clips = $this->clipDao->findByIdList($clipIdList); $list = array(); if (is_array($clips)) { foreach ($clips as $key => $clip) { $clip = (array) $clip; $list[$key] = $clip; $list[$key]['thumb'] = $this->getClipThumbUrl($clip['id'], $clip['code'], $clip['thumbUrl']); } } return $list; }