TenantAtlas/app/Support/References/ReferenceLinkTarget.php
2026-03-10 19:51:41 +01:00

29 lines
671 B
PHP

<?php
declare(strict_types=1);
namespace App\Support\References;
final readonly class ReferenceLinkTarget
{
public function __construct(
public string $targetKind,
public string $url,
public string $actionLabel,
public ?string $contextBadge = null,
) {}
/**
* @return array{targetKind: string, url: string, actionLabel: string, contextBadge: ?string}
*/
public function toArray(): array
{
return [
'targetKind' => $this->targetKind,
'url' => $this->url,
'actionLabel' => $this->actionLabel,
'contextBadge' => $this->contextBadge,
];
}
}