Skip to content

Commit

Permalink
Don't overthink things
Browse files Browse the repository at this point in the history
  • Loading branch information
jimsafley committed Oct 23, 2023
1 parent cc6c4f7 commit 9631122
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
6 changes: 3 additions & 3 deletions application/src/Site/Navigation/Link/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,

];
}

Expand Down
12 changes: 0 additions & 12 deletions application/src/Site/Navigation/Page/UriTargetBlank.php

This file was deleted.

0 comments on commit 9631122

Please sign in to comment.