private function wrapAnchor(MusicItem $data, $textToWrap) { $url = $data->getUrl(); if ($url) { return "<a href=\"" . $url . "\" target=\"_blank\">" . $textToWrap . "</a>"; } return $textToWrap; }
private function addProperties(FinderIndexerResult $item, $baseUrl, MusicItem $musicItem) { $item->url = $baseUrl . urlencode($musicItem->getCdataName()); $item->title = $musicItem->getTitle(); $summary = $this->getSummary($musicItem); $item->summary = $summary; $item->body = $summary; }