From 839d856a40192202c9d31c797ee38e55e9212f1b Mon Sep 17 00:00:00 2001 From: PatrickePatate Date: Mon, 27 Jan 2025 14:22:03 +0100 Subject: [PATCH 1/2] Deprecate setShowIfEmpty() on Embedded Entity Lists --- src/Show/Fields/SharpShowEntityListField.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Show/Fields/SharpShowEntityListField.php b/src/Show/Fields/SharpShowEntityListField.php index e7b18d0c5..cabb11911 100644 --- a/src/Show/Fields/SharpShowEntityListField.php +++ b/src/Show/Fields/SharpShowEntityListField.php @@ -4,6 +4,8 @@ use Code16\Sharp\Utils\Entities\SharpEntityManager; use Code16\Sharp\Utils\Filters\Filter; +use Deprecated; +use Override; class SharpShowEntityListField extends SharpShowField { @@ -115,6 +117,15 @@ public function setLabel(string $label): self return $this; } + /** + * @deprecated + * @return SharpShowField + */ + public function setShowIfEmpty(bool $showIfEmpty = true): SharpShowField + { + return $this; + } + /** * Create the properties array for the field, using parent::buildArray(). */ From 307d838cd23e0ccc2a1b367ef7d3180fc3a03982 Mon Sep 17 00:00:00 2001 From: PatrickePatate Date: Mon, 27 Jan 2025 15:10:44 +0100 Subject: [PATCH 2/2] Add deprecated message --- src/Show/Fields/SharpShowEntityListField.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Show/Fields/SharpShowEntityListField.php b/src/Show/Fields/SharpShowEntityListField.php index cabb11911..94c4f0fef 100644 --- a/src/Show/Fields/SharpShowEntityListField.php +++ b/src/Show/Fields/SharpShowEntityListField.php @@ -5,7 +5,6 @@ use Code16\Sharp\Utils\Entities\SharpEntityManager; use Code16\Sharp\Utils\Filters\Filter; use Deprecated; -use Override; class SharpShowEntityListField extends SharpShowField { @@ -118,7 +117,7 @@ public function setLabel(string $label): self } /** - * @deprecated + * @deprecated Not used anymore, EEL are shown no matter what. * @return SharpShowField */ public function setShowIfEmpty(bool $showIfEmpty = true): SharpShowField