mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 10:56:12 +03:00
fix
This commit is contained in:
+10
@@ -48,3 +48,13 @@ Thumbs.db
|
|||||||
*.mov
|
*.mov
|
||||||
*.wmv
|
*.wmv
|
||||||
|
|
||||||
|
_utils
|
||||||
|
.env
|
||||||
|
src/config.php
|
||||||
|
*_config.php
|
||||||
|
!default_config.php
|
||||||
|
src/Defines.php
|
||||||
|
src/*Defines.php
|
||||||
|
src/*Facade.php
|
||||||
|
!*.example
|
||||||
|
!.example
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see https://blog.jetbrains.com/phpstorm/2019/02/new-phpstorm-meta-php-features/
|
||||||
|
*/
|
||||||
|
namespace PHPSTORM_META
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
registerArgumentsSet(
|
||||||
|
'bx_assets_template_list',
|
||||||
|
'kit:button',
|
||||||
|
'kit:collapse',
|
||||||
|
'kit:input',
|
||||||
|
'kit:inputFile',
|
||||||
|
'kit:modal',
|
||||||
|
'kit:picture',
|
||||||
|
'kit:pictureOwlLazy',
|
||||||
|
'kit:select',
|
||||||
|
'kit:textarea',
|
||||||
|
'kit:card/block',
|
||||||
|
'kit:elementproperty/s/field',
|
||||||
|
'kit:elementproperty/s/view',
|
||||||
|
'kit:field/hint',
|
||||||
|
'kit:lightGallery/svg/zoom',
|
||||||
|
'kit:page/link',
|
||||||
|
'kit:page/metaName',
|
||||||
|
'kit:page/metaProperty',
|
||||||
|
'kit:svg/call',
|
||||||
|
'kit:svg/call2',
|
||||||
|
'kit:svg/chevronAnimate',
|
||||||
|
'kit:svg/comment',
|
||||||
|
'kit:svg/comments',
|
||||||
|
'kit:svg/eye',
|
||||||
|
'kit:svg/fire',
|
||||||
|
'kit:svg/hamburger',
|
||||||
|
'kit:svg/hint',
|
||||||
|
'kit:svg/home',
|
||||||
|
'kit:svg/mail',
|
||||||
|
'kit:svg/photo',
|
||||||
|
'kit:svg/picture',
|
||||||
|
'kit:svg/star',
|
||||||
|
'kit:svg/thumb-down',
|
||||||
|
'kit:svg/thumb-up',
|
||||||
|
'kit:svg/user',
|
||||||
|
'kit:svg/operator/a1',
|
||||||
|
'kit:svg/operator/line',
|
||||||
|
'kit:svg/operator/mts-round',
|
||||||
|
'kit:svg/operator/mts',
|
||||||
|
'kit:svg/ps/apple-pay',
|
||||||
|
'kit:svg/ps/belkart',
|
||||||
|
'kit:svg/ps/belkart2',
|
||||||
|
'kit:svg/ps/belkartInternetPassword',
|
||||||
|
'kit:svg/ps/bepaid',
|
||||||
|
'kit:svg/ps/google-pay',
|
||||||
|
'kit:svg/ps/mastercard',
|
||||||
|
'kit:svg/ps/mastercardSecureCode',
|
||||||
|
'kit:svg/ps/mastercardText',
|
||||||
|
'kit:svg/ps/mir',
|
||||||
|
'kit:svg/ps/raschet',
|
||||||
|
'kit:svg/ps/samsung-pay',
|
||||||
|
'kit:svg/ps/visa',
|
||||||
|
'kit:svg/ps/visaSecure',
|
||||||
|
'kit:svg/ps/webpay',
|
||||||
|
'kit:svg/ps/yandex-pay',
|
||||||
|
'kit:svg/shop/basket',
|
||||||
|
'kit:svg/shop/cardPictureEmpty',
|
||||||
|
'kit:svg/shop/delivery',
|
||||||
|
'kit:svg/site/clock',
|
||||||
|
'kit:svg/site/geo',
|
||||||
|
'kit:svg/site/mapPointer',
|
||||||
|
'kit:svg/site/search',
|
||||||
|
'kit:svg/social/facebook',
|
||||||
|
'kit:svg/social/instagram',
|
||||||
|
'kit:svg/social/telegram',
|
||||||
|
'kit:svg/social/twitter',
|
||||||
|
'kit:svg/social/whatsapp',
|
||||||
|
'kit:svg/social/round-fill/facebook',
|
||||||
|
'kit:svg/social/round-fill/instagram',
|
||||||
|
'kit:svg/social/round-fill/ok',
|
||||||
|
'kit:svg/social/round-fill/telegram',
|
||||||
|
'kit:svg/social/round-fill/tiktok',
|
||||||
|
'kit:svg/social/round-fill/vk',
|
||||||
|
'kit:svg/social/round-fill/youtube',
|
||||||
|
'kit:svg/social/round-fill-color/facebook',
|
||||||
|
'kit:svg/social/round-fill-color/instagram',
|
||||||
|
'kit:svg/social/round-fill-color/jivo',
|
||||||
|
'kit:svg/social/round-fill-color/telegram',
|
||||||
|
'kit:svg/social/round-fill-color/viber',
|
||||||
|
'kit:svg/social/square-fill-color/facebook',
|
||||||
|
'kit:svg/social/square-fill-color/instagram',
|
||||||
|
'kit:svg/social/square-fill-color/jivo',
|
||||||
|
'kit:svg/social/square-fill-color/telegram',
|
||||||
|
'kit:svg/social/square-fill-color/viber',
|
||||||
|
'kit:wrapper/googleTagParams',
|
||||||
|
);
|
||||||
|
|
||||||
|
expectedArguments(\Wt\Core\Templater\Templater::get(), 0, argumentsSet('bx_assets_template_list'));
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
|
||||||
|
|
||||||
|
|
||||||
|
//$templatePath = app()->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);
|
||||||
Reference in New Issue
Block a user