From 08f659771fff8916efd5ee18b66d644321f7111b Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Tue, 23 Sep 2025 14:58:42 +0200 Subject: [PATCH] Extend MDTagRelationType by taxon, mentioned subject and topic Close #41, close #42 --- l18n | 2 +- src/enums/MDTagRelationType.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/l18n b/l18n index 2c28afe..2784220 160000 --- a/l18n +++ b/l18n @@ -1 +1 @@ -Subproject commit 2c28afedef42aefa28435a112ab7ee80e2160a1d +Subproject commit 2784220447bc1f05db8cee2ff170f9c56c2fa14d diff --git a/src/enums/MDTagRelationType.php b/src/enums/MDTagRelationType.php index 0e6b8eb..57c5a25 100644 --- a/src/enums/MDTagRelationType.php +++ b/src/enums/MDTagRelationType.php @@ -18,6 +18,9 @@ enum MDTagRelationType implements MDValueEnumInterface, JsonSerializable { case material; case technique; case display_subject; + case topic; + case mentioned; + case taxon; /** * Returns a value of this type based on a string. @@ -34,6 +37,9 @@ enum MDTagRelationType implements MDValueEnumInterface, JsonSerializable { 'material' => self::material, 'technique' => self::technique, 'display_subject' => self::display_subject, + 'topic' => self::topic, + 'mentioned' => self::mentioned, + 'taxon' => self::taxon, default => throw new MDpageParameterNotFromListException("Unknown tag relation type"), }; @@ -54,6 +60,9 @@ enum MDTagRelationType implements MDValueEnumInterface, JsonSerializable { 2 => self::material, 3 => self::technique, 4 => self::display_subject, + 5 => self::topic, + 6 => self::mentioned, + 7 => self::taxon, default => throw new MDpageParameterNotFromListException("Unknown tag relation type"), }; @@ -119,6 +128,9 @@ enum MDTagRelationType implements MDValueEnumInterface, JsonSerializable { self::material => 2, self::technique => 3, self::display_subject => 4, + self::topic => 5, + self::mentioned => 6, + self::taxon => 7, // default => throw new MDpageParameterNotFromListException("Unknown tag relation type"), };