public function detail($type, $id) { $item = $this->service->detail($type, $id); DrupalCultureFeedSearchService::translateCategories(array($item)); return $item; }
/** * @see \CultuurNet\Search\ServiceInterface::searchSuggestions(). */ public function detail($type, $id) { $cid = sprintf('detail:%s:%s', $type, $id); if ($cache = $this->cacheGet($cid)) { DrupalCultureFeedSearchService::translateCategories(array($cache->data)); return $cache->data; } $detail = $this->realSearchService->detail($type, $id); DrupalCultureFeedSearchService::translateCategories(array($detail)); $this->cacheSet($cid, $detail, REQUEST_TIME + CULTUREFEED_SEARCH_CACHE_EXPIRES); return $detail; }