Skip to content

Commit

Permalink
fix BcFrontAppView (#2790)
Browse files Browse the repository at this point in the history
  • Loading branch information
nghiem-mb authored Oct 9, 2023
1 parent 54da8c1 commit 6d0e862
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/baser-core/src/View/BcFrontAppView.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace BaserCore\View;

use BaserCore\Utility\BcFolder;
use BaserCore\Utility\BcUtil;
use BaserCore\View\Helper\BcTextHelper;
use Cake\Core\Configure;
Expand All @@ -19,7 +20,6 @@
use BaserCore\Annotation\Checked;
use BaserCore\Annotation\Note;
use Cake\Core\Plugin;
use Cake\Filesystem\Folder;
use Cake\Utility\Inflector;

/**
Expand Down Expand Up @@ -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'));
}
}
Expand Down

0 comments on commit 6d0e862

Please sign in to comment.