From 9631122707fdd9af2207f1ea015e732e5de3ba56 Mon Sep 17 00:00:00 2001 From: Jim Safley Date: Mon, 23 Oct 2023 18:54:43 -0400 Subject: [PATCH] Don't overthink things --- application/src/Site/Navigation/Link/Url.php | 6 +++--- .../src/Site/Navigation/Page/UriTargetBlank.php | 12 ------------ 2 files changed, 3 insertions(+), 15 deletions(-) delete mode 100644 application/src/Site/Navigation/Page/UriTargetBlank.php diff --git a/application/src/Site/Navigation/Link/Url.php b/application/src/Site/Navigation/Link/Url.php index ebcea42e15..83d1fb2db5 100644 --- a/application/src/Site/Navigation/Link/Url.php +++ b/application/src/Site/Navigation/Link/Url.php @@ -2,7 +2,6 @@ namespace Omeka\Site\Navigation\Link; use Omeka\Api\Representation\SiteRepresentation; -use Omeka\Site\Navigation\Page\UriTargetBlank; use Omeka\Stdlib\ErrorStore; class Url implements LinkInterface @@ -38,10 +37,11 @@ public function getLabel(array $data, SiteRepresentation $site) public function toZend(array $data, SiteRepresentation $site) { - $targetBlank = isset($data['target_blank']) ? (bool) $data['target_blank'] : false; return [ - 'type' => $targetBlank ? UriTargetBlank::class : 'uri', + 'type' => 'uri', 'uri' => $data['url'], + 'target' => (isset($data['target_blank']) && $data['target_blank']) ? '_blank' : null, + ]; } diff --git a/application/src/Site/Navigation/Page/UriTargetBlank.php b/application/src/Site/Navigation/Page/UriTargetBlank.php deleted file mode 100644 index 1ab76f40b3..0000000000 --- a/application/src/Site/Navigation/Page/UriTargetBlank.php +++ /dev/null @@ -1,12 +0,0 @@ -