From 1d9a40e79ab6ca83871297788637ad420b783e49 Mon Sep 17 00:00:00 2001 From: nghiem-mb Date: Fri, 6 Oct 2023 11:53:35 +0900 Subject: [PATCH] fix BcFrontAppView --- plugins/baser-core/src/View/BcFrontAppView.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/baser-core/src/View/BcFrontAppView.php b/plugins/baser-core/src/View/BcFrontAppView.php index bdd2cab2e6..53d367966b 100644 --- a/plugins/baser-core/src/View/BcFrontAppView.php +++ b/plugins/baser-core/src/View/BcFrontAppView.php @@ -11,6 +11,7 @@ namespace BaserCore\View; +use BaserCore\Utility\BcFolder; use BaserCore\Utility\BcUtil; use BaserCore\View\Helper\BcTextHelper; use Cake\Core\Configure; @@ -19,7 +20,6 @@ use BaserCore\Annotation\Checked; use BaserCore\Annotation\Note; use Cake\Core\Plugin; -use Cake\Filesystem\Folder; use Cake\Utility\Inflector; /** @@ -59,11 +59,11 @@ protected function setThemeHelpers(): void $theme = BcUtil::getCurrentTheme(); if(!$theme) return; $themeHelpersPath = Plugin::path($theme) . 'src' . DS . 'View' . DS . 'Helper'; - $Folder = new Folder($themeHelpersPath); - $files = $Folder->read(true, true); - if (empty($files[1])) return; + $Folder = new BcFolder($themeHelpersPath); + $files = $Folder->getFiles(); + if (empty($files)) return; - foreach($files[1] as $file) { + foreach($files as $file) { $this->loadHelper(Inflector::camelize($theme, '-') . '.' . basename($file, 'Helper.php')); } }