├── .arclint ├── .babelrc.json ├── .browserslistrc ├── .env.example ├── .eslintrc ├── .gitignore ├── .jedi.php ├── .postcssrc.js ├── .prettierignore ├── .prettierrc.json ├── .stylelintignore ├── .stylelintrc ├── .stylelintrc.json ├── LICENSE ├── README.md ├── bin ├── console ├── db ├── jedi └── module ├── composer.json ├── environments ├── default │ ├── bitrix │ │ ├── .settings.php │ │ ├── .settings_extra.php │ │ ├── modules │ │ │ └── main │ │ │ │ └── include.php │ │ └── php_interface │ │ │ └── dbconn.php │ └── config.php ├── dev │ ├── bitrix │ │ ├── .settings.php │ │ ├── .settings_extra.php │ │ ├── modules │ │ │ └── main │ │ │ │ └── include.php │ │ └── php_interface │ │ │ └── dbconn.php │ └── config.php ├── index.php └── prod │ ├── bitrix │ ├── .settings.php │ ├── .settings_extra.php │ ├── modules │ │ └── main │ │ │ └── include.php │ └── php_interface │ │ └── dbconn.php │ └── config.php ├── local ├── assets │ ├── app.js │ ├── fonts │ │ ├── Lora-Regular.eot │ │ ├── Lora-Regular.svg │ │ ├── Lora-Regular.ttf │ │ ├── Lora-Regular.woff │ │ ├── Lora-Regular.woff2 │ │ ├── montserrat-bold-webfont.eot │ │ ├── montserrat-bold-webfont.svg │ │ ├── montserrat-bold-webfont.ttf │ │ ├── montserrat-bold-webfont.woff │ │ ├── montserrat-bold-webfont.woff2 │ │ ├── montserrat-light-webfont.eot │ │ ├── montserrat-light-webfont.ttf │ │ ├── montserrat-light-webfont.woff │ │ ├── montserrat-medium-webfont.eot │ │ ├── montserrat-medium-webfont.svg │ │ ├── montserrat-medium-webfont.ttf │ │ ├── montserrat-medium-webfont.woff │ │ ├── montserrat-medium-webfont.woff2 │ │ ├── montserrat-regular-webfont.eot │ │ ├── montserrat-regular-webfont.svg │ │ ├── montserrat-regular-webfont.ttf │ │ ├── montserrat-regular-webfont.woff │ │ ├── montserrat-regular-webfont.woff2 │ │ ├── montserrat-semibold-webfont.eot │ │ ├── montserrat-semibold-webfont.svg │ │ ├── montserrat-semibold-webfont.ttf │ │ ├── montserrat-semibold-webfont.woff │ │ ├── montserrat-semibold-webfont.woff2 │ │ ├── opensans-bold-webfont.eot │ │ ├── opensans-bold-webfont.svg │ │ ├── opensans-bold-webfont.ttf │ │ ├── opensans-bold-webfont.woff │ │ ├── opensans-bold-webfont.woff2 │ │ ├── opensans-light-webfont.eot │ │ ├── opensans-light-webfont.svg │ │ ├── opensans-light-webfont.ttf │ │ ├── opensans-light-webfont.woff │ │ ├── opensans-light-webfont.woff2 │ │ ├── opensans-regular-webfont.eot │ │ ├── opensans-regular-webfont.svg │ │ ├── opensans-regular-webfont.ttf │ │ ├── opensans-regular-webfont.woff │ │ ├── opensans-regular-webfont.woff2 │ │ ├── opensans-semibold-webfont.eot │ │ ├── opensans-semibold-webfont.svg │ │ ├── opensans-semibold-webfont.ttf │ │ ├── opensans-semibold-webfont.woff │ │ └── opensans-semibold-webfont.woff2 │ ├── images │ │ └── icons │ │ │ ├── arrow_down.svg │ │ │ ├── arrow_gold_top.svg │ │ │ ├── arrow_left.svg │ │ │ ├── arrow_right.svg │ │ │ ├── bookmark.svg │ │ │ ├── button_close_42_mobile.svg │ │ │ ├── button_close_60_desktop-tablet.svg │ │ │ ├── button_close_mobile_white.svg │ │ │ ├── close_desktop-tablet_white.svg │ │ │ ├── difficult_active.svg │ │ │ ├── difficult_no_active.svg │ │ │ ├── fb.svg │ │ │ ├── gym-1.svg │ │ │ ├── gym-2.svg │ │ │ ├── gym.svg │ │ │ ├── insta.svg │ │ │ ├── log-in.svg │ │ │ ├── log-out.svg │ │ │ ├── logo_gold-mob.svg │ │ │ ├── logo_gold.svg │ │ │ ├── logo_white.svg │ │ │ ├── menu_burger_42_mobile.svg │ │ │ ├── menu_burger_60_tablet.svg │ │ │ ├── menu_burger_tablet_white.svg │ │ │ ├── plus.svg │ │ │ ├── plus_big.svg │ │ │ ├── plus_button_instagram.svg │ │ │ ├── plus_dots_desktop-tablet_white.svg │ │ │ ├── plus_dots_mobile_white.svg │ │ │ ├── plus_small.svg │ │ │ ├── pool-1.svg │ │ │ ├── pool-2.svg │ │ │ ├── pool.svg │ │ │ ├── spa-1.svg │ │ │ ├── spa-2.svg │ │ │ ├── spa.svg │ │ │ ├── term-1.svg │ │ │ ├── term-2.svg │ │ │ ├── term.svg │ │ │ ├── tick 2.svg │ │ │ ├── vk.svg │ │ │ ├── warning.svg │ │ │ ├── yoga.svg │ │ │ ├── yoga_1.svg │ │ │ └── yoga_3.svg │ ├── main.js │ ├── scripts │ │ ├── main.js │ │ ├── routes │ │ │ ├── common.js │ │ │ └── pageMain.js │ │ ├── util │ │ │ ├── Router.js │ │ │ ├── camelCase.js │ │ │ └── vueInvoker.js │ │ └── vue │ │ │ ├── collection.js │ │ │ └── components │ │ │ └── .gitkeep │ ├── scss │ │ ├── _bootstrap.scss │ │ ├── _global.scss │ │ ├── _setups.scss │ │ ├── _variables.scss │ │ ├── blocks │ │ │ └── _index.scss │ │ ├── common │ │ │ ├── _main.scss │ │ │ └── _section.scss │ │ ├── functions │ │ │ └── _index.scss │ │ ├── main.scss │ │ ├── mixin │ │ │ ├── _index.scss │ │ │ ├── _responsive.scss │ │ │ └── _section.scss │ │ └── partials │ │ │ └── _index.scss │ └── styles │ │ ├── _mixins.scss │ │ ├── _normalize.scss │ │ ├── _variables.scss │ │ ├── blocks │ │ ├── footer.scss │ │ ├── header.scss │ │ └── page.scss │ │ └── global.scss ├── classes │ ├── ComposerScript │ │ ├── CacheWarmerHandler.php │ │ └── RunMigrationsHandler.php │ ├── Constants.php │ ├── Services │ │ ├── AssetPathService.php │ │ ├── Bitrix │ │ │ └── Traits │ │ │ │ └── SupressBitrixDemo.php │ │ └── IconSvgLoaders.php │ └── Util │ │ └── Assets.php ├── configs │ ├── .htaccess │ ├── Validation │ │ └── example.yaml │ ├── bundles.php │ ├── packages │ │ ├── bitrix_iblock_element_validator.yaml │ │ ├── custom_arguments_resolvers.yaml │ │ ├── framework.yaml │ │ ├── maker.yaml │ │ ├── monolog.yaml │ │ ├── static_page_maker.yaml │ │ └── twig_extension_pack.yaml │ ├── routes.yaml │ ├── services.yaml │ ├── services │ │ ├── assets.yaml │ │ ├── bitrix.yaml │ │ ├── cache.yaml │ │ ├── console_commands.yaml │ │ ├── controllers.yaml │ │ ├── facades.yaml │ │ ├── filesystem.yaml │ │ ├── guzzle.yaml │ │ ├── tasks.yaml │ │ ├── utils.yaml │ │ └── validations.yaml │ ├── standalone_bundles.php │ └── staticPages │ │ └── statics.yaml ├── functions │ └── helpers.php ├── modules │ └── asd.iblock │ │ ├── classes │ │ └── general │ │ │ ├── iblock_action.php │ │ │ ├── iblock_interface.php │ │ │ ├── iblock_prop_checkbox.php │ │ │ ├── iblock_prop_checkbox_num.php │ │ │ ├── iblock_prop_palette.php │ │ │ ├── iblock_prop_section.php │ │ │ ├── iblock_property.php │ │ │ ├── iblock_rights.php │ │ │ ├── iblock_tools.php │ │ │ ├── iblock_version.php │ │ │ ├── module_version.php │ │ │ └── ~delete~iblock_property.php │ │ ├── include.php │ │ ├── install │ │ ├── index.php │ │ ├── js │ │ │ └── asd.iblock │ │ │ │ ├── admin │ │ │ │ └── elementlist.js │ │ │ │ ├── jpicker │ │ │ │ ├── css │ │ │ │ │ ├── jPicker-1.1.6.css │ │ │ │ │ └── jPicker-1.1.6.min.css │ │ │ │ ├── images │ │ │ │ │ ├── AlphaBar.png │ │ │ │ │ ├── Bars.png │ │ │ │ │ ├── Maps.png │ │ │ │ │ ├── NoColor.png │ │ │ │ │ ├── bar-opacity.png │ │ │ │ │ ├── map-opacity.png │ │ │ │ │ ├── mappoint.gif │ │ │ │ │ ├── picker.gif │ │ │ │ │ ├── preview-opacity.png │ │ │ │ │ └── rangearrows.gif │ │ │ │ ├── jpicker-1.1.6.js │ │ │ │ └── jpicker-1.1.6.min.js │ │ │ │ └── script.js │ │ ├── panel │ │ │ └── asd.iblock │ │ │ │ └── interface.css │ │ ├── tools │ │ │ └── asd.iblock │ │ │ │ └── props_export.php │ │ └── version.php │ │ ├── lang │ │ ├── en │ │ │ ├── classes │ │ │ │ └── general │ │ │ │ │ ├── iblock_action.php │ │ │ │ │ ├── iblock_interface.php │ │ │ │ │ ├── iblock_prop_checkbox.php │ │ │ │ │ ├── iblock_prop_checkbox_num.php │ │ │ │ │ ├── iblock_prop_palette.php │ │ │ │ │ ├── iblock_prop_section.php │ │ │ │ │ └── iblock_property.php │ │ │ ├── include.php │ │ │ └── install │ │ │ │ └── install.php │ │ └── ru │ │ │ ├── classes │ │ │ └── general │ │ │ │ ├── iblock_action.php │ │ │ │ ├── iblock_interface.php │ │ │ │ ├── iblock_prop_checkbox.php │ │ │ │ ├── iblock_prop_checkbox_num.php │ │ │ │ ├── iblock_prop_palette.php │ │ │ │ ├── iblock_prop_section.php │ │ │ │ └── iblock_property.php │ │ │ ├── include.php │ │ │ └── install │ │ │ └── install.php │ │ └── tools │ │ └── props_export.php ├── php_interface │ ├── Net │ │ └── SMTP.php │ ├── events.php │ └── init.php ├── phpunit │ └── bootstrap.php ├── templates │ └── main │ │ ├── footer.php │ │ ├── header.php │ │ └── partials │ │ └── .gitkeep └── twig │ └── static │ ├── example.twig │ ├── example2.twig │ └── template │ └── baseTemplate.twig ├── logs └── .gitignore ├── migrations └── 2018_11_24_190135_801159_settings_for_site.php ├── migrator ├── package.json ├── phpstan-bootstrap.php ├── phpstan.neon ├── postcss.config.js ├── psalm.xml ├── ruleset.xml ├── sites └── s1 │ ├── .access.php │ ├── .htaccess │ ├── .section.php │ ├── .top.menu.php │ ├── 404.php │ ├── __include__ │ ├── .gitkeep │ └── logo.php │ ├── errorScreen.php │ ├── index.php │ └── urlrewrite.php ├── webpack.config.js └── webpack.parts.js /.arclint: -------------------------------------------------------------------------------- 1 | { 2 | "linters": { 3 | "phpSyntax": { 4 | "type": "php", 5 | "include": "(\\.php$)" 6 | }, 7 | "phpcs": { 8 | "type": "phpcs", 9 | "include": "/local\\/(classes|components)\\/.*\\.php/i", 10 | "exclude": "/local\\/components\\/.*\\/templates\\/.*\\.php/i", 11 | "phpcs.standard": "ruleset.xml", 12 | "flags": ["--encoding=utf-8"], 13 | "severity": { 14 | "PHPCS.W.Generic.Files.LineLength.TooLong": "advice", 15 | "PHPCS.E.Generic.Files.LineLength.MaxExceeded": "advice", 16 | "PHPCS.W.PSR1.Files.SideEffects.FoundWithSymbols": "advice" 17 | }, 18 | "bin": ["./vendor/bin/phpcs"] 19 | }, 20 | "json": { 21 | "type": "json", 22 | "include": [ 23 | "(^\\.arcconfig$)", 24 | "(^\\.arclint$)", 25 | "(\\.json$)" 26 | ] 27 | }, 28 | "merge-conflict": { 29 | "type": "merge-conflict" 30 | }, 31 | "eslint": { 32 | "type": "script-and-regex", 33 | "script-and-regex.script": "sh -c 'node ./node_modules/eslint/bin/eslint.js \"$0\" || true'", 34 | "script-and-regex.regex": "/^(\\h+)(?P\\d+):(?P\\d+)(\\h+)(?Pwarning|error)(\\h+)(?P.*)(\\h{2,})(?P.*)$/m", 35 | "include": "/local\\/assets\\/scripts\\/.*\\.(js|vue)/i" 36 | }, 37 | "stylelint": { 38 | "type": "script-and-regex", 39 | "script-and-regex.script": "sh -c 'node ./node_modules/stylelint/bin/stylelint.js \"$0\" || true'", 40 | "script-and-regex.regex": "/^(\\h+)(?P\\d+):(?P\\d+)(\\h+)(?P✖)(\\h+)(?P.*)(\\h{1,})(?P.*)$/m", 41 | "include": "/local\\/assets\\/styles\\/.*\\.scss/i" 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /.babelrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | [ 4 | "@babel/preset-env", 5 | { 6 | "modules": false, 7 | "useBuiltIns": "usage", 8 | "corejs": { 9 | "version": 3, 10 | "proposals": true 11 | } 12 | } 13 | ] 14 | ], 15 | "plugins": [ 16 | [ 17 | "@babel/plugin-transform-runtime", 18 | { 19 | "version": "^7.11.2", 20 | "corejs": false 21 | } 22 | ] 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | [production] 2 | 3 | >=1% in RU 4 | last 2 versions 5 | not dead 6 | 7 | [development] 8 | 9 | last 2 Chrome versions 10 | last 2 Firefox versions 11 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # Режим дебага 2 | DEBUG=true 3 | 4 | # мемкеш или файлы? 5 | USE_MEMCACHE=false 6 | 7 | # Данные подключения к БД 8 | DB_HOST=localhost 9 | DB_LOGIN=root 10 | DB_PASSWORD= 11 | DB_NAME=sitemanager1 12 | 13 | DATABASE_URL=mysql://root:@localhost/sitemanager1 14 | 15 | # Путь до лог-файла 16 | LOG_FILE_PATH=/home/bitrix/logs/app.log 17 | 18 | # При использовании Symfony Messanger 19 | #MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages 20 | 21 | # Насильное переопределение переменных в $_SERVER (для CLI) 22 | #HTTPS=off 23 | #HTTP_HOST=bitrix-example.loc 24 | #SERVER_NAME=bitrix-example.loc 25 | 26 | # Путь к DOCUMENT_ROOT относительно корня сайта (для CLI) 27 | # Если не задано, то будет считать путем '/bin/..' 28 | RELATIVE_DOCUMENT_ROOT_PATH="/sites/s1" 29 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": "airbnb-base", 4 | "plugins": ["vue"], 5 | "rules": { 6 | "vue/jsx-uses-vars": 2, 7 | "no-param-reassign": 0, 8 | "max-len": 0, 9 | "func-names": 0 10 | }, 11 | "env": { 12 | "browser": "true" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /bitrix/ 2 | /.idea 3 | /vendor/ 4 | /node_modules/ 5 | *.log 6 | /bower_components/ 7 | /upload 8 | /local/build 9 | /local/php_interface/custom_mail.php 10 | hosts.yml 11 | .env 12 | .idea 13 | /sites/s1/bitrix 14 | /sites/s1/local 15 | /sites/s1/upload 16 | /sites/s1/test 17 | /local/cache 18 | .vscode/* 19 | !.vscode/settings.json 20 | !.vscode/tasks.json 21 | !.vscode/launch.json 22 | !.vscode/extensions.json 23 | *.code-workspace 24 | .history/ 25 | 26 | /composer.lock 27 | composer.lock 28 | -------------------------------------------------------------------------------- /.jedi.php: -------------------------------------------------------------------------------- 1 | 'sites/s1', 16 | 'env-dir' => 'environments', 17 | 'useModules' => true, 18 | 'commands' => [ 19 | ] 20 | ]; -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | const defaultPostcssPixelToViewportConfig = { 2 | viewportUnit: "vw", 3 | propertyBlacklist: [/(.*)/], 4 | minPixelValue: 2, 5 | mediaQuery: false, 6 | }; 7 | 8 | module.exports = ({ file, options, env }) => ({ 9 | syntax: "postcss-scss", 10 | plugins: [ 11 | require("postcss-import")({ root: file.dirname }), 12 | require("postcss-pixel-to-viewport")({ 13 | ...defaultPostcssPixelToViewportConfig, 14 | 15 | viewportWidth: 320, 16 | enableConvertComment: `xs-viewport`, 17 | disableConvertComment: `xs-viewport-off`, 18 | }), 19 | require("postcss-pixel-to-viewport")({ 20 | ...defaultPostcssPixelToViewportConfig, 21 | 22 | viewportWidth: 768, 23 | enableConvertComment: `md-viewport`, 24 | disableConvertComment: `md-viewport-off`, 25 | }), 26 | require("postcss-pixel-to-viewport")({ 27 | ...defaultPostcssPixelToViewportConfig, 28 | 29 | viewportWidth: 1024, 30 | enableConvertComment: `lg-viewport`, 31 | disableConvertComment: `lg-viewport-off`, 32 | }), 33 | require("postcss-pixel-to-viewport")({ 34 | ...defaultPostcssPixelToViewportConfig, 35 | 36 | viewportWidth: 1920, 37 | enableConvertComment: `xl-viewport`, 38 | disableConvertComment: `xl-viewport-off`, 39 | }), 40 | require("postcss-responsive-font")(), 41 | require("postcss-calc")(), 42 | require("postcss-flexbugs-fixes")(), 43 | require("postcss-preset-env")({ 44 | autoprefixer: { 45 | grid: env === "production", 46 | }, 47 | }), 48 | ], 49 | }); -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | local/build/ 2 | local/dist/ 3 | sites/s1/ 4 | upload/ 5 | bitrix/ 6 | vendor/ 7 | node_modules/ 8 | .git/ 9 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "auto" 3 | } 4 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | local/build/ 2 | local/dist/ 3 | sites/s1/ 4 | upload/ 5 | bitrix/ 6 | vendor/ 7 | node_modules/ 8 | .git/ 9 | .vscode/ 10 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-sass-guidelines", 3 | "rules": { 4 | "scss/dollar-variable-pattern": ".*", 5 | "max-nesting-depth": 3, 6 | "selector-class-pattern": ".*" 7 | } 8 | } -------------------------------------------------------------------------------- /.stylelintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "stylelint-config-standard", 4 | "stylelint-config-recommended-scss", 5 | "stylelint-config-recess-order" 6 | ], 7 | "plugins": ["stylelint-scss"] 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020-2021 Fedor Gavrilov 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | load($envFile); 35 | 36 | // Попытка определить DOCUMENT_ROOT. 37 | $documentRoot = __DIR__. '/..'; 38 | if (array_key_exists('RELATIVE_DOCUMENT_ROOT_PATH', $_ENV)) { 39 | $documentRoot = realpath(__DIR__.'/..') . $_ENV['RELATIVE_DOCUMENT_ROOT_PATH']; 40 | if (!file_exists($documentRoot)) { 41 | die( 42 | 'Path to root ' . $_ENV['RELATIVE_DOCUMENT_ROOT_PATH'] . ' from RELATIVE_DOCUMENT_ROOT_PATH variable not exists' . PHP_EOL 43 | ); 44 | } 45 | } 46 | 47 | $_SERVER['DOCUMENT_ROOT'] = $documentRoot; 48 | $GLOBALS['DOCUMENT_ROOT'] = $documentRoot; 49 | 50 | /** 51 | * Загрузить Битрикс. 52 | */ 53 | $loaderBitrix = new LoaderBitrix(); 54 | $loaderBitrix->setDocumentRoot($_SERVER['DOCUMENT_ROOT']); 55 | $loaderBitrix->initializeBitrix(); 56 | 57 | if (!$loaderBitrix->isBitrixLoaded()) { 58 | exit('Bitrix not initialized.' . PHP_EOL); 59 | } 60 | 61 | if (!container()->has('console.command.manager')) { 62 | exit('Service console.command.manager not registered.'); 63 | } 64 | 65 | /** 66 | * @var ConsoleCommandConfigurator $consoleCommandManager 67 | */ 68 | $consoleCommandManager = container()->get('console.command.manager') 69 | ->init(); 70 | 71 | $consoleCommandManager->run(); 72 | -------------------------------------------------------------------------------- /bin/db: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | init(); 45 | $application->run(); -------------------------------------------------------------------------------- /bin/jedi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | setDocumentRoot($_SERVER['DOCUMENT_ROOT']); 34 | 35 | $jediApplication->run(); -------------------------------------------------------------------------------- /bin/module: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | load($envFile); 38 | 39 | // Попытка определить DOCUMENT_ROOT. 40 | $documentRoot = __DIR__. '/..'; 41 | if (array_key_exists('RELATIVE_DOCUMENT_ROOT_PATH', $_ENV)) { 42 | $documentRoot = realpath(__DIR__.'/..') . $_ENV['RELATIVE_DOCUMENT_ROOT_PATH']; 43 | if (!file_exists($documentRoot)) { 44 | die( 45 | 'Path to root ' . $_ENV['RELATIVE_DOCUMENT_ROOT_PATH'] . ' from RELATIVE_DOCUMENT_ROOT_PATH variable not exists' . PHP_EOL 46 | ); 47 | } 48 | } 49 | 50 | $_SERVER['DOCUMENT_ROOT'] = $documentRoot; 51 | $GLOBALS['DOCUMENT_ROOT'] = $documentRoot; 52 | 53 | /** 54 | * Загрузить Битрикс. 55 | */ 56 | $loaderBitrix = new LoaderBitrix(); 57 | $loaderBitrix->setDocumentRoot($_SERVER['DOCUMENT_ROOT']); 58 | $loaderBitrix->initializeBitrix(); 59 | 60 | if (!$loaderBitrix->isBitrixLoaded()) { 61 | exit('Bitrix not initialized.'); 62 | } 63 | 64 | $application = new ConsoleCommandConfigurator( 65 | new Application(), 66 | new ModuleMaker( 67 | new Filesystem() 68 | ) 69 | ); 70 | 71 | $application->init(); 72 | $application->run(); 73 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "proklung/bitrix-symfony-base.git", 3 | "description": "Bitrix build with integration of Symfony", 4 | "authors": [ 5 | { 6 | "name": "Gavrilov Fedor", 7 | "email": "funtik21975@gmail.com" 8 | } 9 | ], 10 | "keywords": [ 11 | "bitrix", 12 | "symfony" 13 | ], 14 | "license": "MIT", 15 | "repositories": [ 16 | { 17 | "type": "git", 18 | "url": "https://github.com/proklung/bitrix.core.symfony" 19 | }, 20 | { 21 | "type": "git", 22 | "url": "https://github.com/proklung/core.framework.extension.bundle" 23 | }, 24 | { 25 | "type": "git", 26 | "url": "https://github.com/proklung/bitrix.twig.bundle" 27 | }, 28 | { 29 | "type": "git", 30 | "url": "https://github.com/proklung/core.argument.resolvers.bundle" 31 | }, 32 | { 33 | "type": "git", 34 | "url": "https://github.com/proklung/bitrix-models/" 35 | }, 36 | { 37 | "type": "git", 38 | "url": "https://github.com/proklung/jedi-light" 39 | }, 40 | { 41 | "type": "git", 42 | "url": "https://github.com/proklung/framework-tools-bundle" 43 | }, 44 | { 45 | "type": "git", 46 | "url": "https://github.com/proklung/bitrix.tools.pack.bundle" 47 | }, 48 | { 49 | "type": "git", 50 | "url": "https://github.com/ProklUng/bitrix-migrations" 51 | }, 52 | { 53 | "type": "vcs", 54 | "url": "https://github.com/proklung/tools.twig" 55 | } 56 | ], 57 | 58 | "require": { 59 | "proklung/bitrix-core-symfony": "^1.4.1", 60 | "psr/container": "1.0.*", 61 | "proklung/core-framework-extension-bundle": "^1.8", 62 | "proklung/core-argument-resolvers-bundle": "^1.1", 63 | "proklung/bitrixsymfonyrouterbundle": "^1.4", 64 | "proklung/bitrix-twig-bundle": "^1.0", 65 | "arrilot/bitrix-migrations": "dev-master", 66 | "arrilot/bitrix-models": "dev-master", 67 | "maximaster/tools.twig": "dev-master", 68 | "bitrix-expert/bbc": "^1.0", 69 | "proklung/jedi-light": "^1.0", 70 | "illuminate/support": "^6.0 || ^7.0", 71 | "symfony/dotenv": "^5.2", 72 | "symfony/monolog-bundle": "^3.7", 73 | "proklung/facade-bundle": "^1.0", 74 | "proklung/bitrixstaticpagemakerbundle": "^1.0", 75 | "proklung/bitrix-custom-properties-bundle": "^1.1", 76 | "proklung/bitrix-webform-bundle": "^1.0", 77 | "proklung/pipeline-symfony": "^1.0", 78 | "proklung/db-command": "^1.0", 79 | "proklung/bitrix-iblock-element-validator-bundle": "^1.0", 80 | "proklung/framework-tools-bundle": "^1.5", 81 | "proklung/twig-extensions-bundle": "^1.6" 82 | }, 83 | "require-dev": { 84 | "proklung/phpunit-testing-tools": "^1.5", 85 | "proklung/symfony-maker-bundle": "^1.0", 86 | "proklung/bitrix.module.generator": "^1.0", 87 | "symfony/maker-bundle": "^1.33", 88 | "squizlabs/php_codesniffer": "^3", 89 | "symfony/var-dumper": "^4.4 || ^5.0", 90 | "ergebnis/phpstan-rules": "^0.15.3 || ^1", 91 | "phpstan/phpstan-strict-rules": "^0.12.7 || ^1", 92 | "slam/phpstan-extensions": "^5.1", 93 | "mmucklo/krumo": "^0.6.0", 94 | "icanhazstring/composer-unused": "^0.7.5" 95 | }, 96 | "autoload": { 97 | "psr-4": { 98 | "Local\\": "local/classes/" 99 | }, 100 | "files": [ 101 | "local/functions/helpers.php" 102 | ] 103 | }, 104 | "extra": { 105 | "bitrix-dir": "bitrix", 106 | "installer-paths": { 107 | "./bitrix/modules/{$name}/": ["type:bitrix-d7-module", "type:bitrix-module"], 108 | "./bitrix/components/{$name}/": ["type:bitrix-d7-component", "type:bitrix-component"], 109 | "./bitrix/templates/{$name}/": ["type:bitrix-d7-template", "type:bitrix-theme"] 110 | } 111 | }, 112 | "bin": [ 113 | "bin/module", 114 | "bin/console", 115 | "bin/db" 116 | ] 117 | } 118 | -------------------------------------------------------------------------------- /environments/default/bitrix/.settings.php: -------------------------------------------------------------------------------- 1 | load(realpath(__DIR__.'/../') . '/.env'); 15 | 16 | $cache = array ( 17 | 'value' => array ( 18 | 'type' => 'files', 19 | ), 20 | 'readonly' => false, 21 | ); 22 | 23 | 24 | if (env('USE_MEMCACHE')) { 25 | $cache = array( 26 | 'value' => 27 | array( 28 | 'type' => 'memcache', 29 | 'memcache' => array( 30 | 'host' => '127.0.0.1', 31 | 'port' => '11211', 32 | 'sid' => $_SERVER["DOCUMENT_ROOT"].'#site01', 33 | ), 34 | ), 35 | 'readonly' => false 36 | ); 37 | } 38 | 39 | 40 | return array ( 41 | 'utf_mode' => 42 | array ( 43 | 'value' => true, 44 | 'readonly' => true, 45 | ), 46 | 'cache_flags' => 47 | array ( 48 | 'value' => 49 | array ( 50 | 'config_options' => 3600.0, 51 | 'site_domain' => 3600.0, 52 | ), 53 | 'readonly' => false, 54 | ), 55 | 'cookies' => 56 | array ( 57 | 'value' => 58 | array ( 59 | 'secure' => false, 60 | 'http_only' => true, 61 | ), 62 | 'readonly' => false, 63 | ), 64 | 'exception_handling' => 65 | array ( 66 | 'value' => 67 | array ( 68 | 'debug' => env('DEBUG', false), 69 | 'handled_errors_types' => 4437, 70 | 'exception_errors_types' => 4437, 71 | 'ignore_silence' => false, 72 | 'assertion_throws_exception' => true, 73 | 'assertion_error_type' => 256, 74 | ), 75 | 'readonly' => false, 76 | ), 77 | 'connections' => 78 | array ( 79 | 'value' => 80 | array ( 81 | 'default' => 82 | array ( 83 | 'className' => '\\Bitrix\\Main\\DB\\MysqliConnection', 84 | 'host' => env('DB_HOST'), 85 | 'database' => env('DB_NAME'), 86 | 'login' => env('DB_LOGIN'), 87 | 'password' => env('DB_PASSWORD'), 88 | 'options' => 2.0, 89 | ), 90 | ), 91 | 'readonly' => true, 92 | ), 93 | 'cache' => $cache, 94 | 'crypto' => [ 95 | 'value' => [ 96 | 'crypto_key' => 'mysupersecretphrase', 97 | ], 98 | 'readonly' => true, 99 | ] 100 | ); 101 | -------------------------------------------------------------------------------- /environments/default/bitrix/.settings_extra.php: -------------------------------------------------------------------------------- 1 | array( 5 | 'value' => array( 6 | 'tools' => array( 7 | 'twig' => array( 8 | // Режим отладки выключен 9 | 'debug' => env('DEBUG', false), 10 | 11 | //Кодировка 12 | 'charset' => 'UTF-8', 13 | 14 | //кеш хранится в уникальной директории. Должен быть полный абсолютный путь 15 | 'cache' => $_SERVER['DOCUMENT_ROOT'] . '/bitrix/cache/maximaster/tools.twig', 16 | 17 | //Автообновление включается только в момент очистки кеша ИЛИ в режиме дебага 18 | 'auto_reload' => ((isset($_GET[ 'clear_cache' ]) && strtoupper($_GET[ 'clear_cache' ]) == 'Y')) || env('DEBUG', false), 19 | 20 | //Автоэскейп отключен, т.к. битрикс по-умолчанию его сам делает 21 | 'autoescape' => false, 22 | 23 | // Переменные arResult будут доступны не в result, а напрямую 24 | 'extract_result' => false, 25 | 26 | // Импортировать твиговские шаблоны из установленных модулей 27 | 'import_from_modules' => false, 28 | 29 | // Пространства имен 30 | 'namespaces' => [], 31 | 32 | // Globals 33 | 'globals' => [ 34 | 'app' => \Bitrix\Main\Application::getInstance() 35 | ], 36 | 37 | // Runtimes 38 | 'runtimes' => [], 39 | ) 40 | ) 41 | ) 42 | ), 43 | ); 44 | -------------------------------------------------------------------------------- /environments/default/bitrix/php_interface/dbconn.php: -------------------------------------------------------------------------------- 1 | load(realpath(__DIR__.'/../') . '/../.env'); 15 | 16 | define("BX_USE_MYSQLI", true); 17 | define("DBPersistent", false); 18 | $DBType = "mysql"; 19 | $DBHost = env('DB_HOST'); 20 | $DBLogin = env('DB_LOGIN'); 21 | $DBPassword = env('DB_PASSWORD'); 22 | $DBName = env('DB_NAME'); 23 | $DBDebug = false; 24 | $DBDebugToFile = false; 25 | define("MYSQL_TABLE_TYPE", "INNODB"); 26 | 27 | define("DELAY_DB_CONNECT", true); 28 | define("CACHED_b_file", 3600); 29 | define("CACHED_b_file_bucket_size", 10); 30 | define("CACHED_b_lang", 3600); 31 | define("CACHED_b_option", 3600); 32 | define("CACHED_b_lang_domain", 3600); 33 | define("CACHED_b_site_template", 3600); 34 | define("CACHED_b_event", 3600); 35 | define("CACHED_b_agent", 3660); 36 | define("CACHED_menu", 3600); 37 | 38 | define("BX_UTF", true); 39 | define("BX_FILE_PERMISSIONS", 0644); 40 | define("BX_DIR_PERMISSIONS", 0755); 41 | @umask(~BX_DIR_PERMISSIONS); 42 | @ini_set("memory_limit", "512M"); 43 | define("BX_DISABLE_INDEX_PAGE", true); 44 | -------------------------------------------------------------------------------- /environments/default/config.php: -------------------------------------------------------------------------------- 1 | 'NFR-123-456', 9 | * 10 | * // Modules to be installed. 11 | * // Warning: install the modules using DB migration. Install the modules 12 | * // using the settings of the environment, only for dev environment. 13 | * 'modules' => [ 14 | * 'vendor.debug' 15 | * ], 16 | * 17 | * // Options for modules 18 | * 'options' => [ 19 | * 'vendor.module' => [ 20 | * 'OPTION_CODE' => 'value', 21 | * 'OPTION_CODE' => ['value' => 'test', 'siteId' => 's1'] 22 | * ], 23 | * ], 24 | * 25 | * // Settings for module "cluster" 26 | * 'cluster' => [ 27 | * 'memcache' => [ 28 | * [ 29 | * 'GROUP_ID' => 1, 30 | * 'HOST' => 'host', 31 | * 'PORT' => 'port', 32 | * 'WEIGHT' => 'weight', 33 | * 'STATUS' => 'status', 34 | * ], 35 | * [ 36 | * 'GROUP_ID' => 1, 37 | * 'HOST' => 'host', 38 | * 'PORT' => 'port', 39 | * 'WEIGHT' => 'weight', 40 | * 'STATUS' => 'status', 41 | * ] 42 | * ] 43 | * ], 44 | * 45 | * // Values for file .settings.php 46 | * 'settings' => [ 47 | * 'connections' => [ 48 | * 'default' => [ 49 | * 'host' => 'host', 50 | * 'database' => 'db', 51 | * 'login' => 'login', 52 | * 'password' => 'pass', 53 | * 'className' => '\\Bitrix\\Main\\DB\\MysqlConnection', 54 | * 'options' => 2, 55 | * ], 56 | * ] 57 | * ] 58 | * ]; 59 | * ``` 60 | */ 61 | 62 | return [ 63 | // License key for Bitrix 64 | 'licenseKey' => 'DEMO', 65 | 'options' => [ 66 | 'main' => [ 67 | 'site_name' => 'Имя сайта', 68 | 'server_name' => 'site_url', 69 | 'error_reporting' => 0, 70 | 'optimize_css_files' => 'Y', 71 | 'optimize_js_files' => 'Y', 72 | 'use_minified_assets' => 'Y', 73 | 'move_js_to_body' => 'Y', 74 | 'compres_css_js_files' => 'Y', 75 | 'map_top_menu_type' => 'top', 76 | 'map_left_menu_type' => 'left', 77 | ], 78 | 'update' => [ 79 | 'update_devsrv' => 'Y', 80 | ], 81 | 'event_log' => [ 82 | "event_log_logout" => 'N', 83 | "event_log_login_success" => 'N', 84 | "event_log_login_fail" => 'N', 85 | "event_log_register" => 'N', 86 | "event_log_register_fail" => 'N', 87 | "event_log_password_request" => 'N', 88 | "event_log_password_change" => 'N', 89 | "event_log_user_edit" => 'N', 90 | "event_log_user_delete" => 'N', 91 | "event_log_user_groups" => 'N', 92 | "event_log_group_policy" => 'N', 93 | "event_log_module_access" => 'N', 94 | "event_log_file_access" => 'N', 95 | "event_log_task" => 'N', 96 | "event_log_marketplace" => 'N', 97 | ] 98 | ], 99 | ]; 100 | -------------------------------------------------------------------------------- /environments/dev/bitrix/.settings.php: -------------------------------------------------------------------------------- 1 | load(realpath(__DIR__.'/../') . '/.env'); 15 | 16 | $cache = array ( 17 | 'value' => array ( 18 | 'type' => 'files', 19 | ), 20 | 'readonly' => false, 21 | ); 22 | 23 | 24 | if (env('USE_MEMCACHE')) { 25 | $cache = array( 26 | 'value' => 27 | array( 28 | 'type' => 'memcache', 29 | 'memcache' => array( 30 | 'host' => '127.0.0.1', 31 | 'port' => '11211', 32 | 'sid' => $_SERVER["DOCUMENT_ROOT"].'#site01', 33 | ), 34 | ), 35 | 'readonly' => false 36 | ); 37 | } 38 | 39 | 40 | return array ( 41 | 'utf_mode' => 42 | array ( 43 | 'value' => true, 44 | 'readonly' => true, 45 | ), 46 | 'cache_flags' => 47 | array ( 48 | 'value' => 49 | array ( 50 | 'config_options' => 3600.0, 51 | 'site_domain' => 3600.0, 52 | ), 53 | 'readonly' => false, 54 | ), 55 | 'cookies' => 56 | array ( 57 | 'value' => 58 | array ( 59 | 'secure' => false, 60 | 'http_only' => true, 61 | ), 62 | 'readonly' => false, 63 | ), 64 | 'exception_handling' => 65 | array ( 66 | 'value' => 67 | array ( 68 | 'debug' => env('DEBUG', false), 69 | 'handled_errors_types' => 4437, 70 | 'exception_errors_types' => 4437, 71 | 'ignore_silence' => false, 72 | 'assertion_throws_exception' => true, 73 | 'assertion_error_type' => 256, 74 | ), 75 | 'readonly' => false, 76 | ), 77 | 'connections' => 78 | array ( 79 | 'value' => 80 | array ( 81 | 'default' => 82 | array ( 83 | 'className' => '\\Bitrix\\Main\\DB\\MysqliConnection', 84 | 'host' => env('DB_HOST'), 85 | 'database' => env('DB_NAME'), 86 | 'login' => env('DB_LOGIN'), 87 | 'password' => env('DB_PASSWORD'), 88 | 'options' => 2.0, 89 | ), 90 | ), 91 | 'readonly' => true, 92 | ), 93 | 'cache' => $cache, 94 | 'crypto' => [ 95 | 'value' => [ 96 | 'crypto_key' => 'mysupersecretphrase', 97 | ], 98 | 'readonly' => true, 99 | ] 100 | ); 101 | -------------------------------------------------------------------------------- /environments/dev/bitrix/.settings_extra.php: -------------------------------------------------------------------------------- 1 | array( 5 | 'value' => array( 6 | 'tools' => array( 7 | 'twig' => array( 8 | // Режим отладки выключен 9 | 'debug' => env('DEBUG', false), 10 | 11 | //Кодировка 12 | 'charset' => 'UTF-8', 13 | 14 | //кеш хранится в уникальной директории. Должен быть полный абсолютный путь 15 | 'cache' => $_SERVER['DOCUMENT_ROOT'] . '/bitrix/cache/maximaster/tools.twig', 16 | 17 | //Автообновление включается только в момент очистки кеша ИЛИ в режиме дебага 18 | 'auto_reload' => ((isset($_GET[ 'clear_cache' ]) && strtoupper($_GET[ 'clear_cache' ]) == 'Y')) || env('DEBUG', false), 19 | 20 | //Автоэскейп отключен, т.к. битрикс по-умолчанию его сам делает 21 | 'autoescape' => false, 22 | 23 | // Переменные arResult будут доступны не в result, а напрямую 24 | 'extract_result' => false, 25 | 26 | // Импортировать твиговские шаблоны из установленных модулей 27 | 'import_from_modules' => false, 28 | 29 | // Пространства имен 30 | 'namespaces' => [], 31 | 32 | // Globals 33 | 'globals' => [ 34 | 'app' => \Bitrix\Main\Application::getInstance() 35 | ], 36 | 37 | // Runtimes 38 | 'runtimes' => [], 39 | ) 40 | ) 41 | ) 42 | ), 43 | ); -------------------------------------------------------------------------------- /environments/dev/bitrix/php_interface/dbconn.php: -------------------------------------------------------------------------------- 1 | load(realpath(__DIR__.'/../') . '/../.env'); 15 | 16 | define("BX_USE_MYSQLI", true); 17 | define("DBPersistent", false); 18 | $DBType = "mysql"; 19 | $DBHost = env('DB_HOST'); 20 | $DBLogin = env('DB_LOGIN'); 21 | $DBPassword = env('DB_PASSWORD'); 22 | $DBName = env('DB_NAME'); 23 | $DBDebug = false; 24 | $DBDebugToFile = false; 25 | define("MYSQL_TABLE_TYPE", "INNODB"); 26 | 27 | define("DELAY_DB_CONNECT", true); 28 | define("CACHED_b_file", 3600); 29 | define("CACHED_b_file_bucket_size", 10); 30 | define("CACHED_b_lang", 3600); 31 | define("CACHED_b_option", 3600); 32 | define("CACHED_b_lang_domain", 3600); 33 | define("CACHED_b_site_template", 3600); 34 | define("CACHED_b_event", 3600); 35 | define("CACHED_b_agent", 3660); 36 | define("CACHED_menu", 3600); 37 | 38 | define("BX_UTF", true); 39 | define("BX_FILE_PERMISSIONS", 0644); 40 | define("BX_DIR_PERMISSIONS", 0755); 41 | @umask(~BX_DIR_PERMISSIONS); 42 | @ini_set("memory_limit", "512M"); 43 | define("BX_DISABLE_INDEX_PAGE", true); 44 | -------------------------------------------------------------------------------- /environments/dev/config.php: -------------------------------------------------------------------------------- 1 | 'NFR-123-456', 9 | * 10 | * // Modules to be installed. 11 | * // Warning: install the modules using DB migration. Install the modules 12 | * // using the settings of the environment, only for dev environment. 13 | * 'modules' => [ 14 | * 'vendor.debug' 15 | * ], 16 | * 17 | * // Options for modules 18 | * 'options' => [ 19 | * 'vendor.module' => [ 20 | * 'OPTION_CODE' => 'value', 21 | * 'OPTION_CODE' => ['value' => 'test', 'siteId' => 's1'] 22 | * ], 23 | * ], 24 | * 25 | * // Settings for module "cluster" 26 | * 'cluster' => [ 27 | * 'memcache' => [ 28 | * [ 29 | * 'GROUP_ID' => 1, 30 | * 'HOST' => 'host', 31 | * 'PORT' => 'port', 32 | * 'WEIGHT' => 'weight', 33 | * 'STATUS' => 'status', 34 | * ], 35 | * [ 36 | * 'GROUP_ID' => 1, 37 | * 'HOST' => 'host', 38 | * 'PORT' => 'port', 39 | * 'WEIGHT' => 'weight', 40 | * 'STATUS' => 'status', 41 | * ] 42 | * ] 43 | * ], 44 | * 45 | * // Values for file .settings.php 46 | * 'settings' => [ 47 | * 'connections' => [ 48 | * 'default' => [ 49 | * 'host' => 'host', 50 | * 'database' => 'db', 51 | * 'login' => 'login', 52 | * 'password' => 'pass', 53 | * 'className' => '\\Bitrix\\Main\\DB\\MysqlConnection', 54 | * 'options' => 2, 55 | * ], 56 | * ] 57 | * ] 58 | * ]; 59 | * ``` 60 | */ 61 | 62 | return [ 63 | // License key for Bitrix 64 | 'licenseKey' => 'DEMO', 65 | 'options' => [ 66 | 'main' => [ 67 | 'site_name' => 'Имя сайта', 68 | 'server_name' => 'site_url', 69 | 'error_reporting' => 0, 70 | 'optimize_css_files' => 'Y', 71 | 'optimize_js_files' => 'Y', 72 | 'use_minified_assets' => 'Y', 73 | 'move_js_to_body' => 'Y', 74 | 'compres_css_js_files' => 'Y', 75 | 'map_top_menu_type' => 'top', 76 | 'map_left_menu_type' => 'left', 77 | ], 78 | 'update' => [ 79 | 'update_devsrv' => 'Y', 80 | ], 81 | 'event_log' => [ 82 | "event_log_logout" => 'N', 83 | "event_log_login_success" => 'N', 84 | "event_log_login_fail" => 'N', 85 | "event_log_register" => 'N', 86 | "event_log_register_fail" => 'N', 87 | "event_log_password_request" => 'N', 88 | "event_log_password_change" => 'N', 89 | "event_log_user_edit" => 'N', 90 | "event_log_user_delete" => 'N', 91 | "event_log_user_groups" => 'N', 92 | "event_log_group_policy" => 'N', 93 | "event_log_module_access" => 'N', 94 | "event_log_file_access" => 'N', 95 | "event_log_task" => 'N', 96 | "event_log_marketplace" => 'N', 97 | ] 98 | ], 99 | ]; 100 | -------------------------------------------------------------------------------- /environments/index.php: -------------------------------------------------------------------------------- 1 | ' => [ 11 | * 'name' => '', 12 | * 'path' => '' 13 | * ] 14 | * ]; 15 | * ``` 16 | */ 17 | 18 | return [ 19 | 'default' => [ 20 | 'name' => 'Default', 21 | 'path' => 'default' 22 | ], 23 | 'dev' => [ 24 | 'name' => 'Development', 25 | 'path' => 'dev' 26 | ], 27 | 'prod' => [ 28 | 'name' => 'Production', 29 | 'path' => 'prod', 30 | ], 31 | ]; 32 | -------------------------------------------------------------------------------- /environments/prod/bitrix/.settings.php: -------------------------------------------------------------------------------- 1 | load(realpath(__DIR__.'/../') . '/.env'); 15 | 16 | $cache = array ( 17 | 'value' => array ( 18 | 'type' => 'files', 19 | ), 20 | 'readonly' => false, 21 | ); 22 | 23 | 24 | if (env('USE_MEMCACHE')) { 25 | $cache = array( 26 | 'value' => 27 | array( 28 | 'type' => 'memcache', 29 | 'memcache' => array( 30 | 'host' => '127.0.0.1', 31 | 'port' => '11211', 32 | 'sid' => $_SERVER["DOCUMENT_ROOT"].'#site01', 33 | ), 34 | ), 35 | 'readonly' => false 36 | ); 37 | } 38 | 39 | 40 | return array ( 41 | 'utf_mode' => 42 | array ( 43 | 'value' => true, 44 | 'readonly' => true, 45 | ), 46 | 'cache_flags' => 47 | array ( 48 | 'value' => 49 | array ( 50 | 'config_options' => 3600.0, 51 | 'site_domain' => 3600.0, 52 | ), 53 | 'readonly' => false, 54 | ), 55 | 'cookies' => 56 | array ( 57 | 'value' => 58 | array ( 59 | 'secure' => false, 60 | 'http_only' => true, 61 | ), 62 | 'readonly' => false, 63 | ), 64 | 'exception_handling' => 65 | array ( 66 | 'value' => 67 | array ( 68 | 'debug' => env('DEBUG', false), 69 | 'handled_errors_types' => 4437, 70 | 'exception_errors_types' => 4437, 71 | 'ignore_silence' => false, 72 | 'assertion_throws_exception' => true, 73 | 'assertion_error_type' => 256, 74 | ), 75 | 'readonly' => false, 76 | ), 77 | 'connections' => 78 | array ( 79 | 'value' => 80 | array ( 81 | 'default' => 82 | array ( 83 | 'className' => '\\Bitrix\\Main\\DB\\MysqliConnection', 84 | 'host' => env('DB_HOST'), 85 | 'database' => env('DB_NAME'), 86 | 'login' => env('DB_LOGIN'), 87 | 'password' => env('DB_PASSWORD'), 88 | 'options' => 2.0, 89 | ), 90 | ), 91 | 'readonly' => true, 92 | ), 93 | 'cache' => $cache, 94 | 'crypto' => [ 95 | 'value' => [ 96 | 'crypto_key' => 'mysupersecretphrase', 97 | ], 98 | 'readonly' => true, 99 | ] 100 | ); 101 | -------------------------------------------------------------------------------- /environments/prod/bitrix/.settings_extra.php: -------------------------------------------------------------------------------- 1 | array( 5 | 'value' => array( 6 | 'tools' => array( 7 | 'twig' => array( 8 | // Режим отладки выключен 9 | 'debug' => env('DEBUG', false), 10 | 11 | //Кодировка 12 | 'charset' => 'UTF-8', 13 | 14 | //кеш хранится в уникальной директории. Должен быть полный абсолютный путь 15 | 'cache' => $_SERVER['DOCUMENT_ROOT'] . '/bitrix/cache/maximaster/tools.twig', 16 | 17 | //Автообновление включается только в момент очистки кеша ИЛИ в режиме дебага 18 | 'auto_reload' => ((isset($_GET[ 'clear_cache' ]) && strtoupper($_GET[ 'clear_cache' ]) == 'Y')) || env('DEBUG', false), 19 | 20 | //Автоэскейп отключен, т.к. битрикс по-умолчанию его сам делает 21 | 'autoescape' => false, 22 | 23 | // Переменные arResult будут доступны не в result, а напрямую 24 | 'extract_result' => false, 25 | 26 | // Импортировать твиговские шаблоны из установленных модулей 27 | 'import_from_modules' => false, 28 | 29 | // Пространства имен 30 | 'namespaces' => [], 31 | 32 | // Globals 33 | 'globals' => [ 34 | 'app' => \Bitrix\Main\Application::getInstance() 35 | ], 36 | 37 | // Runtimes 38 | 'runtimes' => [], 39 | ) 40 | ) 41 | ) 42 | ), 43 | ); -------------------------------------------------------------------------------- /environments/prod/bitrix/php_interface/dbconn.php: -------------------------------------------------------------------------------- 1 | load(realpath(__DIR__.'/../') . '/../.env'); 15 | 16 | define("BX_USE_MYSQLI", true); 17 | define("DBPersistent", false); 18 | $DBType = "mysql"; 19 | $DBHost = env('DB_HOST'); 20 | $DBLogin = env('DB_LOGIN'); 21 | $DBPassword = env('DB_PASSWORD'); 22 | $DBName = env('DB_NAME'); 23 | $DBDebug = false; 24 | $DBDebugToFile = false; 25 | define("MYSQL_TABLE_TYPE", "INNODB"); 26 | 27 | define("DELAY_DB_CONNECT", true); 28 | define("CACHED_b_file", 3600); 29 | define("CACHED_b_file_bucket_size", 10); 30 | define("CACHED_b_lang", 3600); 31 | define("CACHED_b_option", 3600); 32 | define("CACHED_b_lang_domain", 3600); 33 | define("CACHED_b_site_template", 3600); 34 | define("CACHED_b_event", 3600); 35 | define("CACHED_b_agent", 3660); 36 | define("CACHED_menu", 3600); 37 | 38 | define("BX_UTF", true); 39 | define("BX_FILE_PERMISSIONS", 0644); 40 | define("BX_DIR_PERMISSIONS", 0755); 41 | @umask(~BX_DIR_PERMISSIONS); 42 | @ini_set("memory_limit", "512M"); 43 | define("BX_DISABLE_INDEX_PAGE", true); 44 | -------------------------------------------------------------------------------- /environments/prod/config.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/environments/prod/config.php -------------------------------------------------------------------------------- /local/assets/app.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | 3 | -------------------------------------------------------------------------------- /local/assets/fonts/Lora-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/Lora-Regular.eot -------------------------------------------------------------------------------- /local/assets/fonts/Lora-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/Lora-Regular.ttf -------------------------------------------------------------------------------- /local/assets/fonts/Lora-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/Lora-Regular.woff -------------------------------------------------------------------------------- /local/assets/fonts/Lora-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/Lora-Regular.woff2 -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-bold-webfont.eot -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-bold-webfont.ttf -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-bold-webfont.woff -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-bold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-bold-webfont.woff2 -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-light-webfont.eot -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-light-webfont.ttf -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-light-webfont.woff -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-medium-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-medium-webfont.eot -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-medium-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-medium-webfont.ttf -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-medium-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-medium-webfont.woff -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-medium-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-medium-webfont.woff2 -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-regular-webfont.eot -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-regular-webfont.ttf -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-regular-webfont.woff -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-regular-webfont.woff2 -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-semibold-webfont.eot -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-semibold-webfont.ttf -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-semibold-webfont.woff -------------------------------------------------------------------------------- /local/assets/fonts/montserrat-semibold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/montserrat-semibold-webfont.woff2 -------------------------------------------------------------------------------- /local/assets/fonts/opensans-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-bold-webfont.eot -------------------------------------------------------------------------------- /local/assets/fonts/opensans-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-bold-webfont.ttf -------------------------------------------------------------------------------- /local/assets/fonts/opensans-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-bold-webfont.woff -------------------------------------------------------------------------------- /local/assets/fonts/opensans-bold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-bold-webfont.woff2 -------------------------------------------------------------------------------- /local/assets/fonts/opensans-light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-light-webfont.eot -------------------------------------------------------------------------------- /local/assets/fonts/opensans-light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-light-webfont.ttf -------------------------------------------------------------------------------- /local/assets/fonts/opensans-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-light-webfont.woff -------------------------------------------------------------------------------- /local/assets/fonts/opensans-light-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-light-webfont.woff2 -------------------------------------------------------------------------------- /local/assets/fonts/opensans-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-regular-webfont.eot -------------------------------------------------------------------------------- /local/assets/fonts/opensans-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-regular-webfont.ttf -------------------------------------------------------------------------------- /local/assets/fonts/opensans-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-regular-webfont.woff -------------------------------------------------------------------------------- /local/assets/fonts/opensans-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-regular-webfont.woff2 -------------------------------------------------------------------------------- /local/assets/fonts/opensans-semibold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-semibold-webfont.eot -------------------------------------------------------------------------------- /local/assets/fonts/opensans-semibold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-semibold-webfont.ttf -------------------------------------------------------------------------------- /local/assets/fonts/opensans-semibold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-semibold-webfont.woff -------------------------------------------------------------------------------- /local/assets/fonts/opensans-semibold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/fonts/opensans-semibold-webfont.woff2 -------------------------------------------------------------------------------- /local/assets/images/icons/arrow_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/arrow_gold_top.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/arrow_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /local/assets/images/icons/arrow_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /local/assets/images/icons/bookmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /local/assets/images/icons/button_close_42_mobile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/button_close_60_desktop-tablet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /local/assets/images/icons/button_close_mobile_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/close_desktop-tablet_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/difficult_active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /local/assets/images/icons/difficult_no_active.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /local/assets/images/icons/fb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /local/assets/images/icons/gym-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /local/assets/images/icons/gym-2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /local/assets/images/icons/gym.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /local/assets/images/icons/insta.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /local/assets/images/icons/log-in.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /local/assets/images/icons/log-out.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /local/assets/images/icons/menu_burger_42_mobile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /local/assets/images/icons/menu_burger_60_tablet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /local/assets/images/icons/menu_burger_tablet_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /local/assets/images/icons/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/plus_big.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/plus_button_instagram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/plus_dots_desktop-tablet_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/plus_dots_mobile_white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/plus_small.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/pool-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /local/assets/images/icons/pool-2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /local/assets/images/icons/pool.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /local/assets/images/icons/spa-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /local/assets/images/icons/spa-2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /local/assets/images/icons/spa.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /local/assets/images/icons/term-1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /local/assets/images/icons/term-2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /local/assets/images/icons/term.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /local/assets/images/icons/tick 2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /local/assets/images/icons/vk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /local/assets/images/icons/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /local/assets/images/icons/yoga.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /local/assets/images/icons/yoga_1.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /local/assets/images/icons/yoga_3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /local/assets/main.js: -------------------------------------------------------------------------------- 1 | import "./styles/global.scss"; 2 | 3 | import "./app"; 4 | import "./scripts/main"; 5 | -------------------------------------------------------------------------------- /local/assets/scripts/main.js: -------------------------------------------------------------------------------- 1 | 2 | // import local dependencies 3 | import Router from './util/Router'; 4 | 5 | import common from './routes/common'; 6 | 7 | // import pageMain module on-demand only when body has `page_main` class 8 | const pageMain = () => import('./routes/pageMain'); 9 | 10 | /** Populate Router instance with DOM routes */ 11 | const routes = new Router({ 12 | // All pages 13 | common, 14 | // Main page 15 | pageMain, 16 | }); 17 | 18 | document.addEventListener("DOMContentLoaded", function () { 19 | vueInvoker.init(Vue, vueCollection); 20 | }); 21 | -------------------------------------------------------------------------------- /local/assets/scripts/routes/common.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import vueInvoker from '../util/vueInvoker'; 3 | import vueCollection from '../vue/collection'; 4 | 5 | export default { 6 | init() { 7 | // JavaScript to be fired on all pages 8 | 9 | vueInvoker.init(Vue, vueCollection); 10 | }, 11 | finalize() { 12 | // JavaScript to be fired on all pages, after page specific JS is fired 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /local/assets/scripts/routes/pageMain.js: -------------------------------------------------------------------------------- 1 | export default { 2 | init() { 3 | // JavaScript to be fired on the main page 4 | }, 5 | finalize() { 6 | // JavaScript to be fired on the main page, after the init JS 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /local/assets/scripts/util/Router.js: -------------------------------------------------------------------------------- 1 | import camelCase from './camelCase'; 2 | 3 | /** 4 | * DOM-based Routing 5 | * @link https://github.com/roots/sage/blob/master/resources/assets/scripts/util/Router.js 6 | * Based on {@link http://goo.gl/EUTi53|Markup-based Unobtrusive Comprehensive DOM-ready Execution} by Paul Irish 7 | * 8 | * The routing fires all common scripts, followed by the page specific scripts. 9 | * Add additional events for more control over timing e.g. a finalize event 10 | */ 11 | class Router { 12 | /** 13 | * Create a new Router 14 | * @param {Object} routes 15 | */ 16 | constructor(routes) { 17 | this.routes = routes; 18 | } 19 | 20 | /** 21 | * Fire Router events 22 | * @param {string} route DOM-based route derived from body classes (``) 23 | * @param {string} [event] Events on the route. By default, `init` and `finalize` events are called. 24 | * @param {string} [arg] Any custom argument to be passed to the event. 25 | */ 26 | fire(route, event = 'init', arg) { 27 | const fire = route !== '' && this.routes[route]; 28 | 29 | if (fire) { 30 | let routeInstance = this.routes[route]; 31 | let isDynamic = false; 32 | 33 | if (typeof routeInstance === 'function') { 34 | routeInstance = routeInstance(); 35 | isDynamic = true; 36 | } 37 | 38 | Promise.resolve(routeInstance).then((resolvedRoute) => { 39 | if (isDynamic) { 40 | resolvedRoute = resolvedRoute.default; 41 | } 42 | if (typeof resolvedRoute[event] === 'function') { 43 | resolvedRoute[event](arg); 44 | } 45 | }); 46 | } 47 | } 48 | 49 | /** 50 | * Automatically load and fire Router events 51 | * 52 | * Events are fired in the following order: 53 | * * common init 54 | * * page-specific init 55 | * * page-specific finalize 56 | * * common finalize 57 | */ 58 | loadEvents() { 59 | // Fire common init JS 60 | this.fire('common'); 61 | 62 | // Fire page-specific init JS, and then finalize JS 63 | document.body.className 64 | .toLowerCase() 65 | .replace(/-/g, '_') 66 | .split(/\s+/) 67 | .map(camelCase) 68 | .forEach((className) => { 69 | this.fire(className); 70 | this.fire(className, 'finalize'); 71 | }); 72 | 73 | // Fire common finalize JS 74 | this.fire('common', 'finalize'); 75 | } 76 | } 77 | 78 | export default Router; 79 | -------------------------------------------------------------------------------- /local/assets/scripts/util/camelCase.js: -------------------------------------------------------------------------------- 1 | /** 2 | * the most terrible camelizer on the internet, guaranteed! 3 | * @link https://github.com/roots/sage/blob/master/resources/assets/scripts/util/camelCase.js 4 | * @param {string} str String that isn't camel-case, e.g., CAMeL_CaSEiS-harD 5 | * @return {string} String converted to camel-case, e.g., camelCaseIsHard 6 | * 7 | */ 8 | export default str => `${str.charAt(0).toLowerCase()}${str.replace(/[\W_]/g, '|').split('|') 9 | .map(part => `${part.charAt(0).toUpperCase()}${part.slice(1)}`) 10 | .join('') 11 | .slice(1)}`; 12 | -------------------------------------------------------------------------------- /local/assets/scripts/util/vueInvoker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Модуль для автоматической инициализации Vue компонентов на странице сайта 3 | * 4 | * Метод `init(Vue, components)` Загружает компоненты в соответствующие элементы на странице 5 | * и передает в них изначальные данные 6 | * 7 | * Например, вместо блока: 8 | * 9 | *
10 | * 11 | * Будет подключен компонент DemoApp (если тот присутствует в объекте-коллекции `components`) 12 | * 13 | * и в его свойство initial будет передан JSON-объект {"test": "data"} 14 | * 15 | * Передача в метод экземпляра `Vue` позволяет предварительно его сконфигурировать: 16 | * например, добавить Vuex-store и/или разнообразные плагины и миксины. 17 | */ 18 | 19 | export default { 20 | init(Vue, components, options) { 21 | this.options = Object.assign(this.options, options); 22 | 23 | const nodes = Array.from(document.querySelectorAll(this.options.selector)); 24 | 25 | const collection = []; 26 | 27 | nodes.forEach((item) => { 28 | let initialData = item.dataset[this.options.initialDataAttr]; 29 | 30 | if (initialData !== undefined) { 31 | try { 32 | initialData = JSON.parse(initialData); 33 | } catch (e) { 34 | if (DEBUG) { 35 | console.warn(e); 36 | } 37 | } 38 | } 39 | 40 | if ( 41 | components[item.dataset[this.options.componentDataAttr]] !== undefined 42 | ) { 43 | collection.push( 44 | this.createComponentInstance( 45 | Vue, 46 | item, 47 | components[item.dataset[this.options.componentDataAttr]], 48 | initialData 49 | ) 50 | ); 51 | } 52 | }); 53 | 54 | return collection; 55 | }, 56 | 57 | options: { 58 | selector: ".vue-component", 59 | componentDataAttr: "component", 60 | initialDataAttr: "initial", 61 | }, 62 | 63 | createComponentInstance(Vue, element, component, data) { 64 | return new Vue({ 65 | el: element, 66 | render(h) { 67 | return h(component, { 68 | props: { initial: data }, 69 | }); 70 | }, 71 | }); 72 | }, 73 | }; 74 | -------------------------------------------------------------------------------- /local/assets/scripts/vue/collection.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Здесь определяется коллекция Vue компонентов для модуля vueInvoker 3 | * Помимо "статичных" компонентов возможна также загрузка динамических "по требованию" 4 | * 5 | * import StaticComponent from './components/StaticComponent' 6 | * export default { 7 | * StaticComponent, 8 | * DynamicComponent: () => import('./components/DynamicComponent.vue') 9 | * }; 10 | * 11 | */ 12 | 13 | export default { 14 | 15 | }; 16 | -------------------------------------------------------------------------------- /local/assets/scripts/vue/components/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/scripts/vue/components/.gitkeep -------------------------------------------------------------------------------- /local/assets/scss/_bootstrap.scss: -------------------------------------------------------------------------------- 1 | @import "~bootstrap/scss/root"; 2 | @import "~bootstrap/scss/reboot"; 3 | @import "~bootstrap/scss/type"; 4 | @import "~bootstrap/scss/images"; 5 | // @import "~bootstrap/scss/code"; 6 | @import "~bootstrap/scss/grid"; 7 | @import "~bootstrap/scss/tables"; 8 | @import "~bootstrap/scss/forms"; 9 | @import "~bootstrap/scss/buttons"; 10 | @import "~bootstrap/scss/transitions"; 11 | @import "~bootstrap/scss/dropdown"; 12 | @import "~bootstrap/scss/button-group"; 13 | @import "~bootstrap/scss/input-group"; 14 | @import "~bootstrap/scss/custom-forms"; 15 | @import "~bootstrap/scss/nav"; 16 | @import "~bootstrap/scss/navbar"; 17 | @import "~bootstrap/scss/card"; 18 | @import "~bootstrap/scss/breadcrumb"; 19 | @import "~bootstrap/scss/pagination"; 20 | @import "~bootstrap/scss/badge"; 21 | // @import "~bootstrap/scss/jumbotron"; 22 | @import "~bootstrap/scss/alert"; 23 | // @import "~bootstrap/scss/progress"; 24 | @import "~bootstrap/scss/media"; 25 | @import "~bootstrap/scss/list-group"; 26 | @import "~bootstrap/scss/close"; 27 | // @import "~bootstrap/scss/toasts"; 28 | @import "~bootstrap/scss/modal"; 29 | @import "~bootstrap/scss/tooltip"; 30 | @import "~bootstrap/scss/popover"; 31 | // @import "~bootstrap/scss/carousel"; 32 | // @import "~bootstrap/scss/spinners"; 33 | @import "~bootstrap/scss/utilities"; 34 | @import "~bootstrap/scss/print"; 35 | -------------------------------------------------------------------------------- /local/assets/scss/_global.scss: -------------------------------------------------------------------------------- 1 | @import "functions"; 2 | @import "mixin"; 3 | @import "variables"; 4 | -------------------------------------------------------------------------------- /local/assets/scss/_setups.scss: -------------------------------------------------------------------------------- 1 | /** main custom setups */ 2 | 3 | // Панель Bitrix 4 | #bx-panel { 5 | z-index: 999999 !important; 6 | } 7 | -------------------------------------------------------------------------------- /local/assets/scss/blocks/_index.scss: -------------------------------------------------------------------------------- 1 | // @import "popup"; 2 | 3 | -------------------------------------------------------------------------------- /local/assets/scss/common/_main.scss: -------------------------------------------------------------------------------- 1 | /* контейнер main */ 2 | .main { 3 | position: relative; 4 | flex: 1; // in ie11 doesn't work correctly 5 | background-color: $color_white; 6 | transition: all 0.4s ease; 7 | 8 | // style only for ie11 9 | @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { 10 | flex: none; 11 | flex-grow: 1; 12 | flex-shrink: 1; 13 | } 14 | 15 | &-blocks { 16 | padding-top: 24px; 17 | padding-right: 0; 18 | padding-bottom: 24px; 19 | padding-left: 0; 20 | 21 | @include media-breakpoint-up(md) { 22 | padding-right: 20px; 23 | padding-left: 20px; 24 | } 25 | 26 | @include media-breakpoint-up(xl) { 27 | padding-right: 32px; 28 | padding-left: 32px; 29 | } 30 | 31 | &-title { 32 | margin-top: 0; 33 | color: $color_main; 34 | text-transform: uppercase; 35 | } 36 | } 37 | } 38 | 39 | .page { 40 | padding-top: 110px; 41 | 42 | @include media-breakpoint-up(md) { 43 | padding-top: 140px; 44 | } 45 | 46 | @include media-breakpoint-up(xl) { 47 | padding-top: 120px; 48 | } 49 | } 50 | 51 | /* black row on the top of pages, under header */ 52 | .blackRow { 53 | height: calc(110px + 30px); 54 | min-height: calc(110px + 30px); 55 | margin-bottom: -30px; 56 | background: 57 | transparent linear-gradient(180deg, #202020 0%, #000 100%) 0% 0% 58 | no-repeat padding-box; 59 | 60 | @include media-breakpoint-up(md) { 61 | height: calc(140px + 60px); 62 | min-height: calc(140px + 60px); 63 | margin-bottom: -60px; 64 | } 65 | 66 | @include media-breakpoint-up(xl) { 67 | height: calc(120px + 55px); 68 | min-height: calc(120px + 55px); 69 | margin-bottom: -55px; 70 | } 71 | } 72 | 73 | /* test content on main page */ 74 | .testImg { 75 | width: 100%; 76 | height: 370px; 77 | background-repeat: no-repeat; 78 | background-position: center center; 79 | background-size: cover; 80 | 81 | @include media-breakpoint-up(md) { 82 | height: 430px; 83 | } 84 | 85 | @include media-breakpoint-up(xl) { 86 | height: 500px; 87 | } 88 | 89 | @media (min-width: 1400px) { 90 | height: 600px; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /local/assets/scss/common/_section.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/scss/common/_section.scss -------------------------------------------------------------------------------- /local/assets/scss/functions/_index.scss: -------------------------------------------------------------------------------- 1 | @import "~bootstrap/scss/functions"; 2 | -------------------------------------------------------------------------------- /local/assets/scss/main.scss: -------------------------------------------------------------------------------- 1 | /* Переменные */ 2 | @import "global"; 3 | @import "bootstrap"; 4 | @import "setups"; // настройки 5 | -------------------------------------------------------------------------------- /local/assets/scss/mixin/_index.scss: -------------------------------------------------------------------------------- 1 | @import "~bootstrap/scss/mixins"; 2 | @import "responsive"; 3 | @import "section"; 4 | -------------------------------------------------------------------------------- /local/assets/scss/mixin/_responsive.scss: -------------------------------------------------------------------------------- 1 | @mixin mobile($only: false) { 2 | @if $only == false { 3 | @content; 4 | } 5 | 6 | @else { 7 | @include media-breakpoint-down(md) { 8 | 9 | @content; 10 | } 11 | } 12 | } 13 | 14 | @mixin tablet() { 15 | @include media-breakpoint-up(md) { 16 | @content; 17 | } 18 | } 19 | 20 | @mixin desktop() { 21 | @include media-breakpoint-up(lg) { 22 | @content; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /local/assets/scss/mixin/_section.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/assets/scss/mixin/_section.scss -------------------------------------------------------------------------------- /local/assets/scss/partials/_index.scss: -------------------------------------------------------------------------------- 1 | // @import "main"; 2 | // @import "footer"; 3 | -------------------------------------------------------------------------------- /local/assets/styles/_mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin clearfix { 2 | &::after { 3 | clear: both; 4 | content: ''; 5 | display: table; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /local/assets/styles/_variables.scss: -------------------------------------------------------------------------------- 1 | $font-family: Verdana, Arial, Helverica, sans-serif; 2 | $font-size-xs: 10px; 3 | $font-size-sm: 12px; 4 | $font-size-md: 16px; 5 | $font-size-lg: 21px; 6 | $font-size-xl: 25px; 7 | $font-size-title: 28px; 8 | $screen-xs: 0; 9 | $screen-sm: 480px; 10 | $screen-md: 768px; 11 | $screen-lg: 992px; 12 | $screen-xl: 1280px; 13 | -------------------------------------------------------------------------------- /local/assets/styles/blocks/footer.scss: -------------------------------------------------------------------------------- 1 | .footer { 2 | &__inner { 3 | box-sizing: border-box; 4 | margin: 0 auto; 5 | padding: 30px 50px 15px; 6 | width: $screen-xl; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /local/assets/styles/blocks/header.scss: -------------------------------------------------------------------------------- 1 | .header { 2 | &__inner { 3 | box-sizing: border-box; 4 | margin: 0 auto; 5 | max-width: $screen-xl; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /local/assets/styles/blocks/page.scss: -------------------------------------------------------------------------------- 1 | .page { 2 | &__top { 3 | background: #fff; 4 | } 5 | 6 | &__middle { 7 | margin: 0 auto; 8 | width: $screen-xl; 9 | } 10 | 11 | &__content { 12 | padding: 10px 50px; 13 | } 14 | 15 | &__bottom { 16 | background: #ebebeb; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /local/assets/styles/global.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | @import 'mixins'; 3 | @import 'normalize'; 4 | @import 'blocks/page'; 5 | @import 'blocks/header'; 6 | @import 'blocks/footer'; 7 | -------------------------------------------------------------------------------- /local/classes/ComposerScript/CacheWarmerHandler.php: -------------------------------------------------------------------------------- 1 | getIO(); 23 | 24 | $output = shell_exec('php bin/console cache:clear'); 25 | $io->write($output); 26 | 27 | $output = shell_exec('php bin/console cache:warm'); 28 | $io->write($output); 29 | } 30 | } -------------------------------------------------------------------------------- /local/classes/ComposerScript/RunMigrationsHandler.php: -------------------------------------------------------------------------------- 1 | getIO(); 21 | 22 | $output = shell_exec('php migrator migrate'); 23 | $io->write($output); 24 | } 25 | } -------------------------------------------------------------------------------- /local/classes/Constants.php: -------------------------------------------------------------------------------- 1 | iconPath = $iconPath; 44 | $this->buildPath = $buildPath; 45 | $this->documentRoot = $documentRoot; 46 | } 47 | 48 | /** 49 | * Загрузить. 50 | * 51 | * @return string 52 | * @throws RuntimeException Файл не найден. 53 | */ 54 | public function load() : string 55 | { 56 | $content = file_get_contents( 57 | $this->documentRoot . '/' . $this->buildPath . $this->iconPath 58 | ); 59 | 60 | if ($content === false) { 61 | throw new RuntimeException( 62 | 'File with icons ' . $this->iconPath . ' not found' 63 | ); 64 | } 65 | 66 | return $content; 67 | } 68 | } -------------------------------------------------------------------------------- /local/configs/.htaccess: -------------------------------------------------------------------------------- 1 | Deny from all 2 | -------------------------------------------------------------------------------- /local/configs/Validation/example.yaml: -------------------------------------------------------------------------------- 1 | 'ID' : 'required|numeric' 2 | 'TYPE': 'required|string' 3 | -------------------------------------------------------------------------------- /local/configs/bundles.php: -------------------------------------------------------------------------------- 1 | URL без домена статической страницы. 4 | # Если равно 0 - механизм не используется. 5 | seo_iblock_id: 0 6 | set_last_modified_header: true 7 | -------------------------------------------------------------------------------- /local/configs/packages/twig_extension_pack.yaml: -------------------------------------------------------------------------------- 1 | twig_extension_pack: 2 | globals: 3 | secret_key: 'xxxx' 4 | # Отсылка к переменной сервис-провайдера. 5 | kernel.debug: '%kernel.debug%' 6 | path_build: 'webpack.build.path' 7 | # Сервисы указывать без @ - иначе не компилируется контейнер. 8 | app: 'native.app.twig.variable' 9 | 10 | -------------------------------------------------------------------------------- /local/configs/routes.yaml: -------------------------------------------------------------------------------- 1 | _common: 2 | resource: staticPages/statics.yaml 3 | 4 | foo_route: 5 | path: /api/foo/ 6 | controller: 'Local\SymfonyTools\Router\Examples\DummyController::action' 7 | 8 | foo_placeholder_route: 9 | path: /api/foo/{id}/ 10 | controller: 'Local\SymfonyTools\Router\Examples\DummyController::loadAction' 11 | requirements: 12 | id: "[0-9]+" 13 | -------------------------------------------------------------------------------- /local/configs/services.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - {resource: services/utils.yaml } 3 | - {resource: services/filesystem.yaml } 4 | - {resource: services/cache.yaml } 5 | - {resource: services/validations.yaml } 6 | - {resource: services/assets.yaml } 7 | - {resource: services/bitrix.yaml } 8 | - {resource: services/controllers.yaml } 9 | - {resource: services/guzzle.yaml } 10 | - {resource: services/console_commands.yaml } 11 | - {resource: services/tasks.yaml } 12 | - {resource: services/facades.yaml } 13 | 14 | parameters: 15 | namespace.models.infoblocks: 'Local\Models' 16 | debug: '%env(bool:resolve:DEBUG)%' 17 | # Компилировать ли сервис-контейнер? 18 | compile.container: true 19 | 20 | # Путь к сборке окружения dev. 21 | build.dev.path: 'local/build/' 22 | # Путь к сборке окружения prod. 23 | build.production.path: 'local/dist/' 24 | 25 | # Базовый API URL (partial). 26 | base.api.url: '/api/' 27 | 28 | csrf_protection: false 29 | enable_annotations: true 30 | 31 | services: 32 | # конфигурация по умолчанию в *этом* файле 33 | _defaults: 34 | autowire: true 35 | autoconfigure: true 36 | public: true 37 | -------------------------------------------------------------------------------- /local/configs/services/assets.yaml: -------------------------------------------------------------------------------- 1 | ########## 2 | # Ассеты 3 | ########## 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | 12 | Local\Services\AssetPathService: ~ 13 | 14 | # Пути к сборке Webpack. 15 | build.path: 16 | class: Local\Services\AssetPathService 17 | factory: ['@Local\Services\AssetPathService', 'pathBuild'] 18 | arguments: ['%debug%', '%build.dev.path%', '%build.production.path%'] 19 | 20 | assets.manager: 21 | class: Local\Util\Assets 22 | arguments: ['@build.path'] 23 | 24 | Local\Util\Assets: '@assets.manager' 25 | 26 | # Загрузчик иконок SVG. 27 | icons.svg: 28 | class: Local\Services\IconSvgLoaders 29 | arguments: ['%kernel.project_dir%', '@build.path', '/images/icons.svg'] 30 | 31 | # Загрузить иконки SVG. 32 | icons.svg.load: 33 | class: Local\Services\IconSvgLoaders 34 | factory: ['@icons.svg', 'load'] 35 | -------------------------------------------------------------------------------- /local/configs/services/bitrix.yaml: -------------------------------------------------------------------------------- 1 | ########### 2 | # Битрикс 3 | ########### 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | 12 | CIBlockElement: 13 | class: CIBlockElement 14 | 15 | CIBlockSection: 16 | class: CIBlockSection 17 | 18 | # Инстанс $APPLICATION 19 | application: 20 | class: CMain 21 | 22 | CFile: 23 | class: CFile 24 | CUser: 25 | class: CUser 26 | CMain: 27 | class: CMain 28 | 29 | -------------------------------------------------------------------------------- /local/configs/services/cache.yaml: -------------------------------------------------------------------------------- 1 | ######### 2 | # Cache 3 | ######### 4 | services: 5 | # конфигурация по умолчанию в *этом* файле 6 | _defaults: 7 | autowire: true 8 | autoconfigure: true 9 | public: true 10 | 11 | # My custom adapter 12 | app.cache.adapter.filesystem: 13 | public: true 14 | autowire: true 15 | autoconfigure: false 16 | parent: 'cache.adapter.filesystem' 17 | tags: 18 | - { name: 'cache.pool', namespace: 'test_namespace', default_lifetime: 600 } -------------------------------------------------------------------------------- /local/configs/services/console_commands.yaml: -------------------------------------------------------------------------------- 1 | ##################### 2 | # Консольные команды 3 | ##################### 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | 12 | -------------------------------------------------------------------------------- /local/configs/services/controllers.yaml: -------------------------------------------------------------------------------- 1 | ############## 2 | # Контроллеры 3 | ############## 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | -------------------------------------------------------------------------------- /local/configs/services/facades.yaml: -------------------------------------------------------------------------------- 1 | ######### 2 | # Фасады 3 | ######### 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | -------------------------------------------------------------------------------- /local/configs/services/filesystem.yaml: -------------------------------------------------------------------------------- 1 | #################################### 2 | # Абстрактный слой файловой системы 3 | #################################### 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | 12 | Symfony\Component\Filesystem\Filesystem: '@filesystem' 13 | -------------------------------------------------------------------------------- /local/configs/services/guzzle.yaml: -------------------------------------------------------------------------------- 1 | #################### 2 | # Guzzle middleware 3 | ################### 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | 12 | bitrix.simple.cacher.configured: 13 | class: Prokl\FrameworkExtensionBundle\Services\Bitrix\Psr16Cache\BitrixCacher 14 | arguments: ['@Bitrix\Main\Data\Cache'] 15 | calls: 16 | - setBaseDir: ['/guzzle_request'] 17 | - setTtl: [3600] 18 | 19 | bitrix.psr.simple.cacher.adapter: 20 | class: Prokl\GuzzleBundle\Middlewares\Cache\Adapter\CacheInterfaceAdapter 21 | arguments: ['@bitrix.simple.cacher.configured', 3600] 22 | -------------------------------------------------------------------------------- /local/configs/services/tasks.yaml: -------------------------------------------------------------------------------- 1 | ################## 2 | # Schedule tasks 3 | ################## 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | 12 | # Образец scheduled task. 13 | Prokl\TaskSchedulerBundle\Examples\ExampleTask: 14 | tags: 15 | - { name: ts.task } -------------------------------------------------------------------------------- /local/configs/services/utils.yaml: -------------------------------------------------------------------------------- 1 | ########################## 2 | # Вспомогательные сервисы 3 | ########################## 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | 12 | # Адаптированный Pipeline. 13 | Prokl\Pipeline\Hub: 14 | arguments: ['@service_container'] 15 | 16 | Prokl\Pipeline\Pipeline: 17 | arguments: ['@service_container'] 18 | 19 | public_logger: '@logger' 20 | -------------------------------------------------------------------------------- /local/configs/services/validations.yaml: -------------------------------------------------------------------------------- 1 | ######################### 2 | # Валидация, санитизация 3 | ######################### 4 | 5 | services: 6 | # конфигурация по умолчанию в *этом* файле 7 | _defaults: 8 | autowire: true 9 | autoconfigure: true 10 | public: true 11 | 12 | # Санитайзер. 13 | sanitizer: 14 | class: Prokl\RequestValidatorSanitizer\Sanitizing\SanitizerService 15 | -------------------------------------------------------------------------------- /local/configs/standalone_bundles.php: -------------------------------------------------------------------------------- 1 | ['all' => true], 5 | Prokl\CustomArgumentResolverBundle\CustomArgumentResolverBundle::class => ['all' => true], 6 | Prokl\BitrixTwigBundle\BitrixTwigBundle::class => ['all' => true], 7 | Prokl\FrameworkExtensionBundle\FrameworkExtensionBundle::class => ['all' => true], 8 | Prokl\BitrixSymfonyRouterBundle\SymfonyRouterBundle::class => ['all' => true], 9 | Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], 10 | Symfony\Bundle\MakerBundle\MakerBundle::class => ['all' => true], 11 | Prokl\BitrixIblockElementValidatorBundle\BitrixIblockElementValidatorBundle::class => ['all' => true], 12 | Prokl\StaticPageMakerBundle\StaticPageMakerBundle::class => ['all' => true], 13 | Prokl\BitrixWebformBundle\BitrixWebformBundle::class => ['all' => true], 14 | Prokl\FacadeBundle\FacadeBundle::class => ['all' => true], 15 | Prokl\TwigExtensionsPackBundle\TwigExtensionsPackBundle::class => ['all' => true], 16 | Prokl\BundleMakerBundle\BundleMakerBundle::class => ['dev' => true], 17 | ]; 18 | -------------------------------------------------------------------------------- /local/configs/staticPages/statics.yaml: -------------------------------------------------------------------------------- 1 | # Пример рендеринга простой статической страницы прямо из роута. 2 | simple_static_page: 3 | path: /simple_page/ 4 | methods: [GET] 5 | controller: 'Prokl\StaticPageMakerBundle\Services\TemplateControllerContainerAware::templateAction' 6 | defaults: 7 | template: './static/example2.twig' 8 | context: 9 | url: /simple_page/ 10 | # Препроцессоры контекста. 11 | _processors: 12 | - '@Prokl\StaticPageMakerBundle\Services\ContextProcessors\ExampleContextProcessor' 13 | # Сервис как параметр 14 | options: '@app.options' 15 | site_name: 'Example site' 16 | object: 17 | errored: true 18 | finished: true 19 | pending: true 20 | page_type: 'static-page' 21 | title: 'Простая статическая страница' 22 | description: 'Простая статическая страница' 23 | -------------------------------------------------------------------------------- /local/functions/helpers.php: -------------------------------------------------------------------------------- 1 | get('bx.config')->get($key); 7 | } 8 | } 9 | 10 | if (!function_exists('bxConfig')) { 11 | /** 12 | * Запускаем из под phpunit? 13 | * 14 | * @return boolean 15 | * 16 | */ 17 | function isPHPUnit(): bool 18 | { 19 | // defined by PHPUnit 20 | return defined('PHPUNIT_COMPOSER_INSTALL') || defined('__PHPUNIT_PHAR__'); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /local/modules/asd.iblock/classes/general/iblock_rights.php: -------------------------------------------------------------------------------- 1 | = $strAccess); 35 | } 36 | } 37 | 38 | public static function CheckSectionOperation($intIBlockID, $intSectionID, $strOperation, $strAccess) { 39 | $intIBlockID = intval($intIBlockID); 40 | if ($intIBlockID <= 0) { 41 | return false; 42 | } 43 | $intSectionID = intval($intSectionID); 44 | if ($intSectionID < 0) { 45 | return false; 46 | } 47 | if (!self::$boolCheck) { 48 | self::CheckExtRights(); 49 | } 50 | if (self::$boolExtRights) { 51 | return CIBlockSectionRights::UserHasRightTo($intIBlockID, $intSectionID, $strOperation); 52 | } else { 53 | return (CIBlock::GetPermission($intIBlockID) >= $strAccess); 54 | } 55 | } 56 | 57 | public static function CheckElementOperation($intIBlockID, $intElementID, $strOperation, $strAccess) { 58 | $intIBlockID = intval($intIBlockID); 59 | if ($intIBlockID <= 0) { 60 | return false; 61 | } 62 | $intElementID = intval($intElementID); 63 | if ($intElementID <= 0) { 64 | return false; 65 | } 66 | if (!self::$boolCheck) { 67 | self::CheckExtRights(); 68 | } 69 | if (self::$boolExtRights) { 70 | return CIBlockElementRights::UserHasRightTo($intIBlockID, $intElementID, $strOperation); 71 | } else { 72 | return (CIBlock::GetPermission($intIBlockID) >= $strAccess); 73 | } 74 | } 75 | 76 | public static function IsIBlockDisplay($intIBlockID) { 77 | return self::CheckIBlockOperation($intIBlockID, 'iblock_admin_display', 'W'); 78 | } 79 | 80 | public static function IsIBlockEdit($intIBlockID) { 81 | return self::CheckIBlockOperation($intIBlockID, 'iblock_edit', 'X'); 82 | } 83 | 84 | public static function IsIBlockElementCreate($intIBlockID) { 85 | return self::CheckIBlockOperation($intIBlockID, 'section_element_bind', 'W'); 86 | } 87 | 88 | public static function IsIBlockElementDelete($intIBlockID) { 89 | return self::CheckIBlockOperation($intIBlockID, 'element_delete', 'W'); 90 | } 91 | 92 | public static function IsIBlockElementEdit($intIBlockID) { 93 | return self::CheckIBlockOperation($intIBlockID, 'element_edit', 'W'); 94 | } 95 | 96 | public static function IsIBlockSectionCreate($intIBlockID) { 97 | return self::CheckIBlockOperation($intIBlockID, 'section_section_bind', 'W'); 98 | } 99 | 100 | public static function IsIBlockSectionDelete($intIBlockID) { 101 | return self::CheckIBlockOperation($intIBlockID, 'section_delete', 'W'); 102 | } 103 | 104 | public static function IsSectionElementCreate($intIBlockID, $intSectionID) { 105 | return self::CheckSectionOperation($intIBlockID, $intSectionID, 'section_element_bind', 'W'); 106 | } 107 | 108 | public static function IsSectionElementDelete($intIBlockID, $intSectionID) { 109 | return self::CheckSectionOperation($intIBlockID, $intSectionID, 'element_delete', 'W'); 110 | } 111 | 112 | public static function IsSectionElementEdit($intIBlockID, $intSectionID) { 113 | return self::CheckSectionOperation($intIBlockID, $intSectionID, 'element_edit', 'W'); 114 | } 115 | 116 | public static function IsSectionSectionCreate($intIBlockID, $intSectionID) { 117 | return self::CheckSectionOperation($intIBlockID, $intSectionID, 'section_section_bind', 'W'); 118 | } 119 | 120 | public static function IsElementEdit($intIBlockID, $intElementID) { 121 | return self::CheckElementOperation($intIBlockID, $intElementID, 'element_edit', 'W'); 122 | } 123 | 124 | public static function IsElementDelete($intIBlockID, $intElementID) { 125 | return self::CheckElementOperation($intIBlockID, $intElementID, 'element_delete', 'W'); 126 | } 127 | 128 | public static function IsElementEditPrice($intIBlockID, $intElementID) { 129 | return self::CheckElementOperation($intIBlockID, $intElementID, 'element_edit_price', 'W'); 130 | } 131 | 132 | } -------------------------------------------------------------------------------- /local/modules/asd.iblock/classes/general/iblock_version.php: -------------------------------------------------------------------------------- 1 | ='); 39 | } 40 | 41 | /** 42 | * @param string $module 43 | * 44 | * @return void 45 | */ 46 | protected static function loadModuleVersion(string $module): void 47 | { 48 | self::$moduleVersion[$module] = '0.0.0'; 49 | $moduleObject = CModule::CreateModuleObject($module); 50 | if ($moduleObject) { 51 | self::$moduleVersion[$module] = $moduleObject->MODULE_VERSION; 52 | } 53 | 54 | unset($moduleObject); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /local/modules/asd.iblock/include.php: -------------------------------------------------------------------------------- 1 | 'classes/general/iblock_interface.php', 13 | 'CASDiblockInterface' => 'classes/general/iblock_interface.php', 14 | 'CASDiblockAction' => 'classes/general/iblock_action.php', 15 | 'CASDiblockTools' => 'classes/general/iblock_tools.php', 16 | 'CASDIblockElementTools' => 'classes/general/iblock_tools.php', 17 | 'CASDiblockPropCheckbox' => 'classes/general/iblock_prop_checkbox.php', 18 | 'CASDiblockPropCheckboxNum' => 'classes/general/iblock_prop_checkbox_num.php', 19 | 'CASDiblockPropPalette' => 'classes/general/iblock_prop_palette.php', 20 | 'CASDiblockPropSection' => 'classes/general/iblock_prop_section.php', 21 | 'CASDIblockRights' => 'classes/general/iblock_rights.php', 22 | 'CASDiblockVersion' => 'classes/general/iblock_version.php', 23 | 'CASDModuleVersion' => 'classes/general/module_version.php' 24 | ) 25 | ); 26 | 27 | $arJSAsdIBlockConfig = [ 28 | 'asd_iblock' => [ 29 | 'js' => '/local/modules/asd.iblock/install/js/asd.iblock/script.js', 30 | 'css' => '/local/modules/asd.iblock/install/panel/asd.iblock/interface.css', 31 | 'rel' => ['jquery2'], 32 | ], 33 | 'asd_element_list' => [ 34 | 'js' => '/bitrix/js/asd.iblock/admin/elementlist.js', 35 | 'css' => '/local/modules/asd.iblock/install/panel/asd.iblock/interface.css', 36 | 'rel' => ['core'] 37 | ], 38 | 'asd_palette' => [ 39 | 'js' => '/local/modules/asd.iblock/install/js/asd.iblock/jpicker/jpicker-1.1.6.min.js', 40 | 'css' => '/local/modules/asd.iblock/install/js/asd.iblock/jpicker/css/jPicker-1.1.6.min.css', 41 | 'rel' => ['jquery2'], 42 | ], 43 | ]; 44 | 45 | foreach ($arJSAsdIBlockConfig as $ext => $arExt) { 46 | CJSCore::RegisterExt($ext, $arExt); 47 | } 48 | -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/css/jPicker-1.1.6.min.css: -------------------------------------------------------------------------------- 1 | .jPicker .Icon{display:inline-block;height:24px;position:relative;text-align:left;width:25px}.jPicker .Icon span.Color,.jPicker .Icon span.Alpha{background-position:2px 2px;display:block;height:100%;left:0;position:absolute;top:0;width:100%}.jPicker .Icon span.Image{background-repeat:no-repeat;cursor:pointer;display:block;height:100%;left:0;position:absolute;top:0;width:100%}.jPicker.Container{color:#000;z-index:10}table.jPicker{background-color:#efefef;border:1px outset #666;font-family:Arial,Helvetica,Sans-Serif;font-size:12px!important;margin:0;padding:5px;width:545px;z-index:4000}.jPicker .Move{background-color:#ddd;border-color:#fff #666 #666 #fff;border-style:solid;border-width:1px;cursor:move;height:12px;padding:0}.jPicker .Title{font-size:11px!important;font-weight:bold;margin:-2px 0 0 0;padding:10px 0 0 0;text-align:center;width:100%}.jPicker div.Map{border-bottom:2px solid #fff;border-left:2px solid #9a9a9a;border-right:2px solid #fff;border-top:2px solid #9a9a9a;cursor:crosshair;height:260px;margin:0 10px 10px 10px;overflow:hidden;padding:0;position:relative;width:260px}.jPicker div[class="Map"]{height:256px;width:256px}.jPicker div.Bar{border-bottom:2px solid #fff;border-left:2px solid #9a9a9a;border-right:2px solid #fff;border-top:2px solid #9a9a9a;cursor:n-resize;height:260px;margin:12px 10px 0 5px;overflow:hidden;padding:0;position:relative;width:24px}.jPicker div[class="Bar"]{height:256px;width:20px}.jPicker .Map .Map1,.jPicker .Map .Map2,.jPicker .Map .Map3,.jPicker .Bar .Map1,.jPicker .Bar .Map2,.jPicker .Bar .Map3,.jPicker .Bar .Map4,.jPicker .Bar .Map5,.jPicker .Bar .Map6{background-color:transparent;background-image:none;display:block;left:0;position:absolute;top:0}.jPicker .Map .Map1,.jPicker .Map .Map2,.jPicker .Map .Map3{height:2596px;width:256px}.jPicker .Bar .Map1,.jPicker .Bar .Map2,.jPicker .Bar .Map3,.jPicker .Bar .Map4{height:3896px;width:20px}.jPicker .Bar .Map5,.jPicker .Bar .Map6{height:256px;width:20px}.jPicker .Map .Map1,.jPicker .Map .Map2,.jPicker .Bar .Map6{background-repeat:no-repeat}.jPicker .Map .Map3,.jPicker .Bar .Map5{background-repeat:repeat}.jPicker .Bar .Map1,.jPicker .Bar .Map2,.jPicker .Bar .Map3,.jPicker .Bar .Map4{background-repeat:repeat-x}.jPicker .Map .Arrow{display:block;position:absolute}.jPicker .Bar .Arrow{display:block;left:0;position:absolute}.jPicker .Preview{font-size:9px;padding:5px 0 0 0;text-align:center}.jPicker .Preview div{border:2px inset #eee;height:62px;margin:0 auto;padding:0;width:62px}.jPicker .Preview div span{border:1px solid #000;display:block;height:30px;margin:0 auto;padding:0;width:60px}.jPicker .Preview .Active{border-bottom-width:0}.jPicker .Preview .Current{border-top-width:0;cursor:pointer}.jPicker input{font-size:13px}.jPicker .Button{text-align:center;padding:0 4px;width:115px}.jPicker .Button input{padding:2px 0;width:100px}.jPicker .Button .Ok{margin:12px 0 5px 0}.jPicker td{margin:0;padding:0}.jPicker td.Radio{margin:0;padding:0;width:31px}.jPicker td.Radio label{white-space:nowrap;}.jPicker td.Radio input{margin:0 5px 0 0;padding:0}.jPicker td.Text{font-size:12px!important;height:22px;margin:0;padding:0;text-align:left;width:70px}.jPicker tr.Hex td.Text{width:100px}.jPicker td.Text input{background-color:#fff;border:1px inset #aaa;height:19px;margin:0 0 0 5px;text-align:left;width:30px}.jPicker td[class="Text"] input{height:15px}.jPicker tr.Hex td.Text input.Hex{width:50px}.jPicker tr.Hex td.Text input.AHex{width:20px}.jPicker .Grid{text-align:center;width:114px}.jPicker .Grid span.QuickColor{border:1px inset #aaa;cursor:pointer;display:inline-block;height:15px;line-height:15px;margin:0;padding:0;width:19px}.jPicker .Grid span[class="QuickColor"]{width:17px} -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/AlphaBar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/AlphaBar.png -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/Bars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/Bars.png -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/Maps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/Maps.png -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/NoColor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/NoColor.png -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/bar-opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/bar-opacity.png -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/map-opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/map-opacity.png -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/mappoint.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/mappoint.gif -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/picker.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/picker.gif -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/preview-opacity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/preview-opacity.png -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/rangearrows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/modules/asd.iblock/install/js/asd.iblock/jpicker/images/rangearrows.gif -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/js/asd.iblock/script.js: -------------------------------------------------------------------------------- 1 | var sListTable = ''; 2 | var sStartCh = ''; 3 | var sEndCh = ''; 4 | var asdIblockFormLoaded = false; 5 | var asdIblockFormCnt = 0; 6 | 7 | function formLoaded(){ 8 | iblockTable = $('#'+sListTable); 9 | asdIblockFormCnt++; 10 | if(asdIblockFormCnt < 100){ 11 | if($('tr.adm-list-table-row input[type=text]:visible',iblockTable).length>0){ 12 | asdIblockInputChangeInit(); 13 | asdIblockFormLoaded = true; 14 | return true; 15 | } else { 16 | setTimeout(formLoaded,75); 17 | asdIblockFormLoaded = false; 18 | } 19 | } else { 20 | return false; 21 | } 22 | } 23 | 24 | function updateListner(){ 25 | if($('#action_edit_button').length>0){ 26 | $('#action_edit_button').on('click',function(){ 27 | if($(this).hasClass('adm-edit-disable') == false){ 28 | formLoaded(); 29 | } 30 | }); 31 | } else { 32 | setTimeout(updateListner,75); 33 | } 34 | } 35 | function asdIblockInputChangeInit(){ 36 | var numRow = 0; 37 | iblockTable = $('#'+sListTable); 38 | $('tr.adm-list-table-row',iblockTable).each(function(e){ 39 | var thisRow = $(this); 40 | var searchObjects = $('td input[type=text]:visible',thisRow).add('td textarea',thisRow).add('td select',thisRow); 41 | if(searchObjects.length>0){ 42 | numRow++; 43 | var numCol = 0; 44 | searchObjects.each(function(c){ 45 | numCol++; 46 | var thisCol = $(this); 47 | thisCol.attr('data-row',numRow); 48 | thisCol.attr('data-col',numCol); 49 | 50 | thisCol.on('keydown',function(e){ 51 | var obj = { 52 | jq:$(this), 53 | event:e, 54 | where:iblockTable 55 | }; 56 | if(e.ctrlKey){ 57 | asdIblockChangeCurInput(obj); 58 | } 59 | }); 60 | thisCol.on('focus',function(){ 61 | $('.asd_iblock_input_backlight').removeClass('asd_iblock_input_backlight'); 62 | $(this).parents('td.adm-list-table-cell:first').addClass('asd_iblock_input_backlight'); 63 | }) 64 | }); 65 | 66 | $('#'+sListTable+'_footer_edit input:visible').on('click',function(){ 67 | updateListner(); 68 | }); 69 | } 70 | }); 71 | 72 | } 73 | 74 | function asdIblockChangeCurInput(obj){ 75 | var row = obj.jq.data('row'); 76 | var col = obj.jq.data('col'); 77 | var newRow = row; 78 | var newCol = col; 79 | switch(obj.event.keyCode){ 80 | case 37: 81 | newRow = row; 82 | newCol = col-1; 83 | break 84 | case 38: 85 | newRow = row-1; 86 | newCol = col; 87 | break 88 | case 39: 89 | newRow = row; 90 | newCol = col+1; 91 | break 92 | case 40: 93 | newRow = row+1; 94 | newCol = col; 95 | break 96 | } 97 | if (newRow!=row || newCol!=col) { 98 | $('[data-col='+newCol+'][data-row='+newRow+']',obj.where).focus().select(); 99 | } 100 | } 101 | 102 | $(document).ready(function(){ 103 | var jqueryVersion = $.fn.jquery.match('([0-9]{1})\.([0-9]{1,2})\.([0-9]{1,2})'); 104 | if(jqueryVersion[1]>=1){ 105 | if(jqueryVersion[1]>1 || jqueryVersion[2]>7){ 106 | jQuery.fn.extend({ 107 | live: function( types, data, fn ) { 108 | jQuery( this.context ).on( types, this.selector, data, fn ); 109 | return this; 110 | } 111 | }); 112 | } 113 | } 114 | $('#action_edit_button').on('click',function(){ 115 | if($(this).hasClass('adm-edit-disable') == false){ 116 | formLoaded(); 117 | } 118 | }); 119 | 120 | $('#asd_export_prop_all').live('click', function(){ 121 | var $bChecked = $(this).attr('checked'); 122 | $.each($('.asd_export_prop'), function(){ 123 | if ($bChecked) { 124 | $(this).attr('checked', 'checked'); 125 | } else { 126 | $(this).removeAttr('checked'); 127 | } 128 | }); 129 | }); 130 | }); 131 | 132 | function ASDSelIBChange(value) { 133 | BX.style(BX('asd_ib_dest_cont'), 'display', ('asd_copy' == value || 'asd_move' == value ? 'inline-block' : 'none')); 134 | BX.style(BX('asd_ib_dest_sect'), 'display', ('asd_copy' == value || 'asd_move' == value ? 'inline-block' : 'none')); 135 | } 136 | 137 | function ASDSelIBShow(lang) { 138 | if (-1 < BX('asd_ib_dest').selectedIndex) { 139 | var intIBlockID = BX('asd_ib_dest').options[BX('asd_ib_dest').selectedIndex].value; 140 | jsUtils.OpenWindow('/bitrix/admin/iblock_section_search.php?lang='+lang+'&IBLOCK_ID='+intIBlockID+'&n=asd_sect_id', 600, 500); 141 | } 142 | } -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/panel/asd.iblock/interface.css: -------------------------------------------------------------------------------- 1 | .asd-sect-cont { 2 | margin:0 0 0 12px; 3 | display: inline-block; 4 | vertical-align: middle; 5 | line-height: 31px; 6 | height: 31px; 7 | } 8 | 9 | .asd-sect-input { 10 | margin:auto 0 auto 12px; 11 | display: inline-block; 12 | vertical-align: middle; 13 | } 14 | 15 | .asd-sect-descr { 16 | margin:0 0 0 12px; 17 | display: inline-block; 18 | vertical-align: middle; 19 | line-height: 31px; 20 | height: 31px; 21 | max-width: 70px; 22 | text-overflow: ellipsis; 23 | overflow: hidden; 24 | } 25 | .asd_iblock_input_backlight { 26 | background-color:#e0e9ec!important; 27 | } 28 | 29 | .adm-list-table-cell input[type="text"]:focus { 30 | border-color: red !important; 31 | } 32 | .adm-list-table-cell select:focus { 33 | border-color: red !important; 34 | } 35 | .adm-list-table-cell textarea:focus { 36 | border-color: red !important; 37 | } 38 | .adm-workarea .adm-list-table-cell input[type="text"]:focus { 39 | border-color: red !important; 40 | } 41 | .adm-workarea .adm-list-table-cell select:focus { 42 | border-color: red !important; 43 | } 44 | .adm-workarea .adm-list-table-cell textarea:focus { 45 | border-color: red !important; 46 | } -------------------------------------------------------------------------------- /local/modules/asd.iblock/install/tools/asd.iblock/props_export.php: -------------------------------------------------------------------------------- 1 | "4.7.7 (кастомизация)", 4 | "VERSION_DATE" => "2021-03-11 7:11:11" 5 | ]; 6 | ?> 7 | -------------------------------------------------------------------------------- /local/modules/asd.iblock/lang/en/classes/general/iblock_action.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /local/modules/asd.iblock/lang/en/classes/general/iblock_property.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /local/modules/asd.iblock/lang/ru/classes/general/iblock_property.php: -------------------------------------------------------------------------------- 1 | getToken('app')->getValue(); 17 | $_SESSION['csrf_token'] = $appCsrfToken; 18 | 19 | // так как автолоад (в нашем случае) регистрируется до ядра, 20 | // Твиг не успевает зарегистрироваться 21 | // необходимо это действие повтроить еще раз: 22 | maximasterRegisterTwigTemplateEngine(); 23 | 24 | Arrilot\BitrixModels\ServiceProvider::register(); 25 | Arrilot\BitrixModels\ServiceProvider::registerEloquent(); 26 | 27 | // Во избежании проблем с созданием кэша на проде 28 | // @see https://symfony.com/doc/current/setup/file_permissions.html 29 | umask(0000); 30 | 31 | // Symfony сервис-провайдер 32 | $symfonyServiceProvider = new ServiceProvider( 33 | 'local/configs/services.yaml' 34 | ); 35 | 36 | include_once 'events.php'; 37 | 38 | -------------------------------------------------------------------------------- /local/phpunit/bootstrap.php: -------------------------------------------------------------------------------- 1 | debug = true; 13 | 14 | global $DB; 15 | $app = \Bitrix\Main\Application::getInstance(); 16 | $con = $app->getConnection(); 17 | $DB->db_Conn = $con->getResource(); 18 | 19 | // "authorizing" as admin 20 | $_SESSION["SESS_AUTH"]["USER_ID"] = 1; 21 | $_SESSION['PHPUNIT_RUNNING'] = true; 22 | -------------------------------------------------------------------------------- /local/templates/main/footer.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | ShowPanel() ?> 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /local/templates/main/header.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | <?php $APPLICATION->ShowTitle() ?> 10 | 11 | ShowHead(); 12 | 13 | CJSCore::Init('jquery2'); 14 | CJSCore::Init(['fx']); 15 | ?> 16 | 17 | 18 | 19 | 20 | 21 | 22 |
get('icons.svg.load') ?>
23 | 24 |
25 | get('twig.instance'); 27 | ?> 28 | 29 | -------------------------------------------------------------------------------- /local/templates/main/partials/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/local/templates/main/partials/.gitkeep -------------------------------------------------------------------------------- /local/twig/static/example.twig: -------------------------------------------------------------------------------- 1 |




2 |

Я статическая страница

3 | 4 |
5 | {{ param('kernel.project_dir') }} 6 | {{ service('build.path') }} 7 |
8 | 9 |
Привет.
10 | 11 | -------------------------------------------------------------------------------- /local/twig/static/example2.twig: -------------------------------------------------------------------------------- 1 | {% extends "./static/template/baseTemplate.twig" %} 2 | 3 | {# content #} 4 | {% block content %} 5 | {% apply inline_css %} 6 |




7 |

Я статическая страница

8 | 14 | 15 |
16 | Мои параметры: {{ site_name }} 17 |
18 | 19 |

20 |

How are you doing?

25 | 26 |
27 | {{ param('kernel.project_dir') }} 28 | {{ service('build.path') }} 29 |
30 | {% endapply %} 31 | {#{{ render('/api/foo/') }}#} 32 | {% endblock %} 33 | 34 | 35 | -------------------------------------------------------------------------------- /local/twig/static/template/baseTemplate.twig: -------------------------------------------------------------------------------- 1 | {# head #} 2 | {% block header %} 3 | {{ header() }} 4 | 5 | {{ APPLICATION.SetTitle(title) }} 6 | {{ APPLICATION.SetPageProperty('description', description) }} 7 | {{ APPLICATION.SetPageProperty('page_type', page_type) }} 8 | 9 | {% endblock %} 10 | 11 | {# content #} 12 | {% block content %} 13 | 14 | {% endblock %} 15 | 16 | {# footer #} 17 | {% block footer %} 18 | {{ footer() }} 19 | {% endblock %} -------------------------------------------------------------------------------- /logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /migrations/2018_11_24_190135_801159_settings_for_site.php: -------------------------------------------------------------------------------- 1 | "Y", 23 | "SORT" => 1, 24 | "DEF" => "Y", 25 | "NAME" => 'Базовая сборка сайта на битриксе', 26 | "DIR" => '/', 27 | "FORMAT_DATE" => "DD.MM.YYYY", 28 | "FORMAT_DATETIME" => "DD.MM.YYYY HH:MI:SS", 29 | "CHARSET" => "UTF-8", 30 | "SITE_NAME" => 'Базовая сборка сайта на битриксе', 31 | "SERVER_NAME" => "site.loc", 32 | "EMAIL" => "", 33 | "LANGUAGE_ID" => "ru", 34 | "DOC_ROOT" => "", 35 | "DOMAINS" => "site.ru 36 | site.loc 37 | site.test.ru", 38 | 39 | "TEMPLATE" => array( 40 | array( 41 | "TEMPLATE" => "main", 42 | "SORT" => 1, 43 | "CONDITION" => "" 44 | ) 45 | ) 46 | ); 47 | $obSite = new \CSite; 48 | $obSite->Update('s1', $arFields); 49 | 50 | if (strlen($obSite->LAST_ERROR) > 0) { 51 | throw new MigrationException('Ошибка при добавлении свойства инфоблока ' . $obSite->LAST_ERROR); 52 | } 53 | } 54 | 55 | /** 56 | * Reverse the migration. 57 | * 58 | * @return mixed 59 | * @throws \Exception 60 | */ 61 | public function down() 62 | { 63 | // 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /migrator: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | 'migrations', 24 | 'dir' => './migrations', 25 | ]; 26 | 27 | $database = new BitrixDatabaseStorage($config['table']); 28 | $templates = new TemplatesCollection(); 29 | $templates->registerBasicTemplates(); 30 | 31 | $migrator = new Migrator($config, $templates, $database); 32 | 33 | $app = new Application('Migrator'); 34 | $app->add(new MakeCommand($migrator)); 35 | $app->add(new InstallCommand($config['table'], $database)); 36 | $app->add(new MigrateCommand($migrator)); 37 | $app->add(new RollbackCommand($migrator)); 38 | $app->add(new TemplatesCommand($templates)); 39 | $app->add(new StatusCommand($migrator)); 40 | $app->run(); 41 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bitrix-project", 3 | "version": "0.0.1", 4 | "description": "BitrixCMS-based project's initial structure", 5 | "main": "index.js", 6 | "scripts": { 7 | "encore": "encore", 8 | "build": "cross-env NODE_ENV=production encore production", 9 | "dev": "cross-env NODE_ENV=development encore dev --progress", 10 | "debug": "cross-env NODE_ENV=development DEBUG=true encore dev --progress", 11 | "update-browserslist": "npx browserslist@latest --update-db", 12 | "lint": "eslint \"local/assets/**\" --ext .js,.vue --cache --fix", 13 | "lint:css": "stylelint 'local/assets/**/*.{scss,sass,css}'", 14 | "format": "prettier --loglevel warn --write \"local/assets/**/*.{js,css,md,vue}\"", 15 | "serve": "cross-env NODE_ENV=development encore dev-server" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "git+https://github.com/regiomedia/bitrix-project.git" 20 | }, 21 | "author": "", 22 | "license": "ISC", 23 | "bugs": { 24 | "url": "https://github.com/regiomedia/bitrix-project/issues" 25 | }, 26 | "homepage": "https://github.com/regiomedia/bitrix-project#readme", 27 | "devDependencies": { 28 | "@babel/core": "^7.12.10", 29 | "@babel/plugin-transform-runtime": "^7.12.10", 30 | "@babel/preset-env": "^7.12.11", 31 | "@babel/register": "^7.12.10", 32 | "@babel/runtime": "^7.12.5", 33 | "@symfony/webpack-encore": "^1.7.0", 34 | "babel-eslint": "^10.1.0", 35 | "cross-env": "^7.0.3", 36 | "css-loader": "^6.2.0", 37 | "eslint": "^8.6.0", 38 | "eslint-config-prettier": "^8.3.0", 39 | "eslint-plugin-prettier": "^4.0.0", 40 | "eslint-plugin-vue": "^8.3.0", 41 | "file-loader": "^6.2.0", 42 | "node-sass": "^4.14.1", 43 | "postcss-calc": "^8.0.0", 44 | "postcss-flexbugs-fixes": "^5.0.2", 45 | "postcss-import": "^14.0.2", 46 | "postcss-loader": "^6.1.1", 47 | "postcss-pixel-to-viewport": "^1.0.2", 48 | "postcss-preset-env": "^7.2.3", 49 | "postcss-responsive-font": "^1.0.6", 50 | "postcss-scss": "^4.0.0", 51 | "prettier": "^2.2.1", 52 | "sass-loader": "^12.1.0", 53 | "stylelint": "^14.2.0", 54 | "stylelint-config-recess-order": "^3.0.0", 55 | "stylelint-config-recommended-scss": "^5.0.2", 56 | "stylelint-config-standard": "^24.0.0", 57 | "stylelint-scss": "^4.1.0", 58 | "svg-spritemap-webpack-plugin": "^4.1.0", 59 | "url-loader": "^4.1.0", 60 | "vue-eslint-parser": "^8.0.0", 61 | "vue-loader": "^15.9.5", 62 | "vue-template-compiler": "2.6.14", 63 | "webpack-bundle-analyzer": "^4.4.2", 64 | "webpack-notifier": "^1.12.0" 65 | }, 66 | "dependencies": { 67 | "axios": "^0.21.1", 68 | "bootstrap": "^4.6.0", 69 | "vue": "2.6.14", 70 | "popper.js": "^1.16.1", 71 | "regenerator-runtime": "^0.13.7", 72 | "vue-resource": "^1.5.1", 73 | "vuex": "^3.6.2", 74 | "core-js": "^3.6.5" 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /phpstan-bootstrap.php: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ruleset.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | RegioMedia PHP Coding Standard 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | . 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /sites/s1/.access.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sites/s1/.htaccess: -------------------------------------------------------------------------------- 1 | Options -Indexes 2 | ErrorDocument 404 /404.php 3 | 4 | 5 | php_flag session.use_trans_sid off 6 | #php_value display_errors 1 7 | #php_value mbstring.internal_encoding UTF-8 8 | 9 | 10 | 11 | Options +FollowSymLinks 12 | RewriteEngine On 13 | RewriteCond %{REQUEST_FILENAME} !-f 14 | RewriteCond %{REQUEST_FILENAME} !-l 15 | RewriteCond %{REQUEST_FILENAME} !-d 16 | RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$ 17 | RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L] 18 | RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}] 19 | 20 | 21 | 22 | DirectoryIndex index.php index.html 23 | 24 | 25 | 26 | ExpiresActive on 27 | ExpiresByType image/jpeg "access plus 3 day" 28 | ExpiresByType image/gif "access plus 3 day" 29 | ExpiresByType image/png "access plus 3 day" 30 | ExpiresByType text/css "access plus 3 day" 31 | ExpiresByType application/javascript "access plus 3 day" 32 | 33 | -------------------------------------------------------------------------------- /sites/s1/.section.php: -------------------------------------------------------------------------------- 1 | "", 5 | "keywords" => "", 6 | "robots" => "" 7 | ); 8 | ?> 9 | -------------------------------------------------------------------------------- /sites/s1/.top.menu.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sites/s1/404.php: -------------------------------------------------------------------------------- 1 | SetTitle("Страница не найдена"); 10 | 11 | $APPLICATION->IncludeComponent("bitrix:main.map", ".default", array( 12 | "CACHE_TYPE" => "A", 13 | "CACHE_TIME" => "36000000", 14 | "SET_TITLE" => "Y", 15 | "LEVEL" => "3", 16 | "COL_NUM" => "2", 17 | "SHOW_DESCRIPTION" => "Y" 18 | ), 19 | false 20 | ); 21 | 22 | require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?> 23 | -------------------------------------------------------------------------------- /sites/s1/__include__/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProklUng/bitrix-symfony-base/577072a039622c7c7ed7579cf265e9c9c68027d3/sites/s1/__include__/.gitkeep -------------------------------------------------------------------------------- /sites/s1/__include__/logo.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /sites/s1/errorScreen.php: -------------------------------------------------------------------------------- 1 |
2 |

Фатальная ошибка!

3 |
4 |

%error_message%

5 |
6 | 7 |
8 | Свяжитесь с поддержкой, как можно скорее. 9 |
10 |
11 | -------------------------------------------------------------------------------- /sites/s1/index.php: -------------------------------------------------------------------------------- 1 | SetTitle("Главная страница"); 4 | $APPLICATION->SetPageProperty("page_type", "main"); 5 | ?> 6 | 7 |

8 | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Porro quod saepe voluptate voluptatum. Ab assumenda commodi consectetur distinctio dolor doloremque ea error est expedita explicabo facere impedit ipsa ipsum libero modi nihil obcaecati odio perferendis perspiciatis quas quidem, quo recusandae repudiandae sed ullam voluptas voluptates voluptatibus? Ab aspernatur earum fugiat omnis porro quia quo veritatis? 9 |

10 | 11 | -------------------------------------------------------------------------------- /sites/s1/urlrewrite.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | // webpack.config.js 2 | const Encore = require("@symfony/webpack-encore"); 3 | const { 4 | saveWebpackConfig, 5 | configureDevServer, 6 | addBundleAnalyzerPlugin, 7 | resolvePath, 8 | prepareAliases, 9 | addSVGSpritemapPlugin, 10 | configureWatchOptions, 11 | clean, 12 | } = require("./webpack.parts"); 13 | 14 | //Добавляем переменные, чтобы точно понимать текущий режим 15 | const IS_DEV = Encore.isDev() && !Encore.isDevServer(); 16 | const IS_DEV_SERVER = Encore.isDevServer(); 17 | const IS_PRODUCTION = Encore.isProduction(); 18 | 19 | //Сохранение текущей конфигурации webpack в файл 20 | const SAVE_WEBPACK_CONFIG_ENABLED = false; 21 | const SAVE_WEBPACK_CONFIG_FILENAME = "webpack.config.json"; 22 | 23 | //Сохранения отчета для анализа сборки webpack 24 | const BUNDLE_ANALYZER_PLUGIN_ENABLED = false; 25 | const BUNDLE_ANALYZER_PLUGIN_REPORT_FILENAME = "report.html"; 26 | const BUNDLE_ANALYZER_PLUGIN_MODE = "static"; 27 | 28 | const PATHS = { 29 | src: { 30 | local: "local/assets", 31 | mainJs: "local/assets/main.js", 32 | scripts: "local/assets/scripts", 33 | scss: "local/assets/scss", 34 | images: "local/assets/images", 35 | icons: "local/assets/images/icons", 36 | mixin: "local/assets/mixin", 37 | components: "local/assets/components", 38 | }, 39 | output: { 40 | local: IS_PRODUCTION ? "local/dist" : "local/build", 41 | }, 42 | }; 43 | 44 | // prettier-ignore 45 | const PUBLIC_PATH = !IS_DEV ? "/local/dist" : "/local/build"; 46 | 47 | const ALIASES = { 48 | "@": PATHS.src.local, 49 | "@mixin": PATHS.src.mixin, 50 | "@scss": PATHS.src.scss, 51 | "@images": PATHS.src.images, 52 | "@scripts": PATHS.src.scripts, 53 | "@components": PATHS.src.components, 54 | }; 55 | 56 | if (!IS_DEV_SERVER) { 57 | clean(); 58 | } 59 | 60 | Encore 61 | // prettier-ignore 62 | .setOutputPath(PATHS.output.local) 63 | .setPublicPath(PUBLIC_PATH) 64 | .addEntry("main", resolvePath(PATHS.src.mainJs)) 65 | 66 | // Временно отрубаем runtime чанк до тех пор пока Федор не включит поддержку нескольких файлов в entrypoints.json 67 | //TODO: Включить после включения поддержки нескольких файлов для entrypoints.json 68 | .disableSingleRuntimeChunk() 69 | 70 | // Копируем картинки из local/assets в папку, куда сейчас происходит сборка 71 | //TODO: Вопрос на хрена?! 72 | .copyFiles({ 73 | from: resolvePath(PATHS.src.images), 74 | context: "images", 75 | pattern: /^(?!icons(.*)\.svg)$/i, 76 | }) 77 | .addAliases(prepareAliases(ALIASES)) 78 | .enableVueLoader(() => {}, { runtimeCompilerBuild: true, useJsx: false }) 79 | // .enablePostCssLoader() 80 | .enableSassLoader(() => {}, { 81 | resolveUrlLoader: false, 82 | }) 83 | .autoProvideVariables({ 84 | $: "jquery", 85 | jQuery: "jquery", 86 | "window.jQuery": "jquery", 87 | BX: "BX", 88 | "window.BX": "BX", 89 | }) 90 | .configureDefinePlugin((options) => { 91 | options.DEBUG = false; 92 | options["process.env.DEBUG"] = JSON.stringify("false"); 93 | }) 94 | .enableSourceMaps(IS_DEV || IS_DEV_SERVER) 95 | .addExternals({ 96 | BX: "BX", 97 | ymaps: "ymaps", 98 | jquery: "jQuery", 99 | }) 100 | .configureFilenames({ 101 | js: "js/[name].js?v=[fullhash]", 102 | css: "css/[name].css?v=[fullhash]" 103 | }) 104 | .enableVersioning(!IS_DEV_SERVER) 105 | //TODO: перенастроить под chunks: "all" после включения поддержки нескольких файлов для entrypoints.json 106 | .splitEntryChunks() 107 | .configureSplitChunks((splitChunks) => { 108 | splitChunks.chunks = "async"; 109 | }); 110 | 111 | addSVGSpritemapPlugin(PATHS.src.icons, IS_PRODUCTION); 112 | 113 | // Настройки для watch режима 114 | if (IS_DEV_SERVER) { 115 | configureWatchOptions(); 116 | } 117 | 118 | // Настройки для работы dev-server 119 | if (IS_DEV_SERVER) { 120 | configureDevServer(PATHS.output.local); 121 | } 122 | 123 | if (BUNDLE_ANALYZER_PLUGIN_ENABLED) { 124 | addBundleAnalyzerPlugin( 125 | BUNDLE_ANALYZER_PLUGIN_REPORT_FILENAME, 126 | BUNDLE_ANALYZER_PLUGIN_MODE 127 | ); 128 | } 129 | 130 | let config = Encore.getWebpackConfig(); 131 | 132 | config.node = false; 133 | config.optimization.nodeEnv = IS_PRODUCTION ? "production" : "development"; 134 | 135 | /** 136 | * Значение node по умолчанию : 137 | * { 138 | * console: false, 139 | * global: true, 140 | * process: true, 141 | * __filename: 'mock', 142 | * __dirname: 'mock', 143 | * Buffer: true, 144 | * setImmediate: true 145 | * } 146 | */ 147 | 148 | // Сохранения конфига webpack. Для отладки 149 | if (SAVE_WEBPACK_CONFIG_ENABLED) { 150 | saveWebpackConfig(SAVE_WEBPACK_CONFIG_FILENAME, config); 151 | } 152 | 153 | module.exports = config; 154 | -------------------------------------------------------------------------------- /webpack.parts.js: -------------------------------------------------------------------------------- 1 | const saveWebpackConfig = (filename, config) => { 2 | const fs = require("fs"); 3 | 4 | fs.writeFileSync(filename, JSON.stringify(config)); 5 | }; 6 | 7 | const addBundleAnalyzerPlugin = (reportFilename, analyzerMode) => { 8 | const Encore = require("@symfony/webpack-encore"); 9 | const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); 10 | 11 | Encore.addPlugin( 12 | new BundleAnalyzerPlugin({ 13 | reportFilename, 14 | analyzerMode, 15 | }) 16 | ); 17 | }; 18 | 19 | const resolvePath = (...pathSegments) => { 20 | const path = require("path"); 21 | const rootPath = process.cwd(); 22 | 23 | return path.resolve(rootPath, ...pathSegments); 24 | }; 25 | 26 | const configureDevServer = (assetsPath) => { 27 | const Encore = require("@symfony/webpack-encore"); 28 | 29 | Encore 30 | //prettier-ignore 31 | .setManifestKeyPrefix(`${assetsPath}/`) 32 | 33 | }; 34 | 35 | const prepareAliases = (aliases) => { 36 | for (let key in aliases) { 37 | aliases[key] = resolvePath(aliases[key]); 38 | } 39 | 40 | return aliases; 41 | }; 42 | 43 | const addSVGSpritemapPlugin = (iconsPath, isProd) => { 44 | /** 45 | * Add SVG sprite 46 | * 47 | * Examole: 48 | * 49 | * 50 | * https://github.com/cascornelissen/svg-spritemap-webpack-plugin 51 | */ 52 | const Encore = require("@symfony/webpack-encore"); 53 | const SVGSpritemapPlugin = require("svg-spritemap-webpack-plugin"); 54 | 55 | Encore.addPlugin( 56 | new SVGSpritemapPlugin(`${iconsPath}/**/*.svg`, { 57 | output: { 58 | // prettier-ignore 59 | filename: "images/icons.svg", 60 | svgo: isProd 61 | ? { 62 | plugins: [ 63 | 64 | ], 65 | } 66 | : false, 67 | }, 68 | }) 69 | ); 70 | }; 71 | 72 | const configureWatchOptions = () => { 73 | const Encore = require("@symfony/webpack-encore"); 74 | 75 | Encore.configureWatchOptions((watchOptions) => { 76 | watchOptions.ignored = [ 77 | "node_modules/**", 78 | "bitrix/**", 79 | "upload/**", 80 | "vendor/**", 81 | "sites/s1/**", 82 | "environments/**", 83 | "logs/**", 84 | "migrations/**", 85 | "local/classes/**", 86 | "local/components/**", 87 | "local/configs/**", 88 | "local/php_interface/**", 89 | "local/phpunit/**", 90 | "local/phpunit/**", 91 | "local/modules/**", 92 | "local/functions/**", 93 | ]; 94 | }); 95 | }; 96 | 97 | const clean = () => { 98 | const Encore = require("@symfony/webpack-encore"); 99 | 100 | //TODO: отключаем очистку в режиме dev-server, чтобы не снести прод или тп. 101 | Encore.cleanupOutputBeforeBuild(["**/*"]); 102 | }; 103 | 104 | exports.configureDevServer = configureDevServer; 105 | exports.resolvePath = resolvePath; 106 | exports.addBundleAnalyzerPlugin = addBundleAnalyzerPlugin; 107 | exports.saveWebpackConfig = saveWebpackConfig; 108 | exports.prepareAliases = prepareAliases; 109 | exports.addSVGSpritemapPlugin = addSVGSpritemapPlugin; 110 | exports.configureWatchOptions = configureWatchOptions; 111 | exports.clean = clean; 112 | --------------------------------------------------------------------------------