From f3421e51272a11fd548ec072ab6e5aa2473f5407 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Mon, 19 Feb 2024 16:35:42 +1300 Subject: [PATCH] feat: Implement LinkingMode helper to match SiteTree API --- src/MenuItem.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/MenuItem.php b/src/MenuItem.php index 901d6ef..6b4d078 100644 --- a/src/MenuItem.php +++ b/src/MenuItem.php @@ -298,4 +298,14 @@ public function getLinkTypes(): array return $types; } + + + public function getLinkingMode() + { + if ($this->PageID) { + return $this->Page()->LinkingMode(); + } else { + return 'link'; + } + } }