From 7a05dce161ab6404dcf2e39d71172483d125e693 Mon Sep 17 00:00:00 2001 From: bellord13 Date: Wed, 12 Jul 2023 16:26:27 +0300 Subject: [PATCH] fix --- .gitignore | 10 ++++ .phpstorm.meta.php | 99 +++++++++++++++++++++++++++++++++++++ _utils.z/phpstorm.utils.php | 30 +++++++++++ 3 files changed, 139 insertions(+) create mode 100644 .phpstorm.meta.php create mode 100644 _utils.z/phpstorm.utils.php diff --git a/.gitignore b/.gitignore index b24d71e..f9156ff 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,13 @@ Thumbs.db *.mov *.wmv +_utils +.env +src/config.php +*_config.php +!default_config.php +src/Defines.php +src/*Defines.php +src/*Facade.php +!*.example +!.example diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php new file mode 100644 index 0000000..507f9af --- /dev/null +++ b/.phpstorm.meta.php @@ -0,0 +1,99 @@ +service()->templater()->getComponent('kit')->getTemplatePath(); +$templatePath = app()->service()->templater()->getPath() . '/kit/templates'; +$templateSvgPath = $templatePath; + +$GLOBALS['bx_assets_template_list'] = []; + +function scanTemplates($path, $basePath, $recursive = false){ + + $tree = glob($path . '/*.php'); + foreach ((array)$tree as $t) { + $templateName = ltrim(substr($t, strlen($basePath), strlen($t) - strlen($basePath) - 4), "/"); + $GLOBALS['bx_assets_template_list'][] = 'kit:'.$templateName; + } + + if($recursive) { + $treeDir = glob($path . '/*', GLOB_ONLYDIR); + foreach ($treeDir as $dir) { + scanTemplates($dir, $basePath, true); + } + } +} +scanTemplates($templateSvgPath, $templatePath, true); +$str = ''; +foreach ($GLOBALS['bx_assets_template_list'] as $item){ + $str .= "'{$item}'," . PHP_EOL; +} +pre($str, 0); \ No newline at end of file