aboutsummaryrefslogtreecommitdiff
path: root/formats/HtmlFormat.php
diff options
context:
space:
mode:
Diffstat (limited to 'formats/HtmlFormat.php')
-rw-r--r--formats/HtmlFormat.php13
1 files changed, 7 insertions, 6 deletions
diff --git a/formats/HtmlFormat.php b/formats/HtmlFormat.php
index ef66f493..93c824b3 100644
--- a/formats/HtmlFormat.php
+++ b/formats/HtmlFormat.php
@@ -12,20 +12,21 @@ class HtmlFormat extends FormatAbstract
$formatFactory = new FormatFactory();
$buttons = [];
$linkTags = [];
- foreach ($formatFactory->getFormatNames() as $format) {
+ foreach ($formatFactory->getFormatNames() as $formatName) {
// Dynamically build buttons for all formats (except HTML)
- if ($format === 'Html') {
+ if ($formatName === 'Html') {
continue;
}
- $formatUrl = '?' . str_ireplace('format=Html', 'format=' . $format, htmlentities($queryString));
+ $formatUrl = '?' . str_ireplace('format=Html', 'format=' . $formatName, htmlentities($queryString));
$buttons[] = [
'href' => $formatUrl,
- 'value' => $format,
+ 'value' => $formatName,
];
+ $format = $formatFactory->create($formatName);
$linkTags[] = [
'href' => $formatUrl,
- 'title' => $format,
- 'type' => $formatFactory->create($format)->getMimeType(),
+ 'title' => $formatName,
+ 'type' => $format->getMimeType(),
];
}