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); }