From ff353b0adbd413ad435b2da19abb0d67ddf9ccb8 Mon Sep 17 00:00:00 2001 From: ryuring Date: Fri, 10 Jan 2025 15:08:13 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=AB=E3=82=B9=E3=82=BF=E3=83=A0=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=83=86=E3=83=B3=E3=83=84=E3=81=AE=E3=83=95=E3=82=A3?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=89=E3=82=BF=E3=82=A4=E3=83=97=E3=81=A7?= =?UTF-8?q?=E3=83=98=E3=83=AB=E3=83=91=E3=81=8C=E5=AE=9A=E7=BE=A9=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=81=AB=E4=BE=8B=E5=A4=96=E3=82=92=E6=8A=95=E3=81=92=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/View/Helper/CustomContentAdminHelper.php | 3 --- .../src/View/Helper/CustomContentAppHelper.php | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/bc-custom-content/src/View/Helper/CustomContentAdminHelper.php b/plugins/bc-custom-content/src/View/Helper/CustomContentAdminHelper.php index c011786e1e..86741c8047 100644 --- a/plugins/bc-custom-content/src/View/Helper/CustomContentAdminHelper.php +++ b/plugins/bc-custom-content/src/View/Helper/CustomContentAdminHelper.php @@ -185,9 +185,6 @@ public function control(CustomLink $customLink, array $options = []): string */ public function preview(string $fieldName, string $type, CustomField $field): string { - if(is_null($this->{$type})) { - throw new BcException(__d('baser_core', 'ヘルパー "{0}Helper" を定義してください', $type)); - } if (method_exists($this->{$type}, 'preview')) { return $this->{$type}->preview(new CustomLink([ 'name' => $fieldName, diff --git a/plugins/bc-custom-content/src/View/Helper/CustomContentAppHelper.php b/plugins/bc-custom-content/src/View/Helper/CustomContentAppHelper.php index a09619d088..7766e0b952 100644 --- a/plugins/bc-custom-content/src/View/Helper/CustomContentAppHelper.php +++ b/plugins/bc-custom-content/src/View/Helper/CustomContentAppHelper.php @@ -11,6 +11,7 @@ namespace BcCustomContent\View\Helper; +use BaserCore\Error\BcException; use BaserCore\Model\Entity\Content; use BaserCore\Utility\BcContainerTrait; use BaserCore\View\Helper\BcBaserHelper; @@ -82,6 +83,8 @@ public function loadPluginHelper(): void "$plugin", ['className' => "$plugin.$plugin"] ); + } else { + throw new BcException(__d('baser_core', 'ヘルパー "{0}Helper" を定義してください', $plugin)); } } }