示例#1
0
 private function indexArticle(FinderIndexerResult &$item)
 {
     $this->setLanguage($item->language);
     $musicTags = MusicTagsHelper::getMusicTagsFromSummaryBodyItem($item);
     foreach ($musicTags as $musicTag) {
         $this->indexMusicTag($item, $musicTag);
     }
 }
示例#2
0
 private function handleSingleMusicTag($article, MusicTag $musicTag)
 {
     $musicTag->addConfiguration($this->configuration);
     $musicFolder = new MusicFolder($musicTag);
     $htmlTableString = $this->getHtmlTableString($musicTag, $musicFolder);
     if ($musicTag->getConfiguration()->includeSubdirectories()) {
         $path = $musicTag->getPathTrail();
         // Retrieve All subdirs relative to $path...
         $directories = $this->getAllSubdirectories($path);
         foreach ($directories as $directory) {
             $musicFolder = new MusicFolder($musicTag);
             $musicFolder->setOverridePath($path . DIRECTORY_SEPARATOR . $directory);
             $subHtmlTable = $this->getHtmlTableString($musicTag, $musicFolder);
             if ($subHtmlTable) {
                 $title = str_replace(DIRECTORY_SEPARATOR, " — ", $directory);
                 $htmlTableString = $htmlTableString . "<h3>{$title}</h3>" . $subHtmlTable;
             }
         }
     }
     $musicTag->setReplacementContent($htmlTableString);
     MusicTagsHelper::replaceTagsWithReplacementContent($article, $musicTag);
 }