Skip to content

Commit

Permalink
Расширенная конфигурация Twig
Browse files Browse the repository at this point in the history
  • Loading branch information
ProklUng committed Aug 12, 2021
1 parent 3bca3e2 commit 52f9dad
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 10 deletions.
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2020-2021 Fedor Gavrilov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"require": {
"proklung/bitrix-core-symfony": "^1.3.5",
"psr/container": "1.0.*",
"proklung/core-framework-extension-bundle": "^1.6",
"proklung/core-framework-extension-bundle": "^1.7",
"proklung/core-argument-resolvers-bundle": "^1.1",
"proklung/bitrixsymfonyrouterbundle": "^1.3",
"arrilot/bitrix-migrations": "dev-master",
Expand All @@ -68,14 +68,14 @@
"symfony/monolog-bundle": "^3.7",
"proklung/facade-bundle": "^1.0",
"proklung/bitrixstaticpagemakerbundle": "^1.0",
"proklung/bitrix-custom-properties-bundle": "^1.0",
"proklung/bitrix-custom-properties-bundle": "^1.1",
"proklung/bitrix-webform-bundle": "^1.0",
"proklung/pipeline-symfony": "^1.0",
"proklung/db-command": "^1.0",
"proklung/bitrix-iblock-element-validator-bundle": "^1.0",
"proklung/framework-tools-bundle": "^1.5",
"proklung/twig-extensions-bundle": "^1.4",
"proklung/bitrix-tools-pack-bundle": "^1.5"
"proklung/twig-extensions-bundle": "^1.6",
"proklung/bitrix-tools-pack-bundle": "^1.6"
},
"require-dev": {
"proklung/phpunit-testing-tools": "^1.5",
Expand Down
11 changes: 11 additions & 0 deletions environments/default/bitrix/.settings_extra.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@

// Переменные arResult будут доступны не в result, а напрямую
'extract_result' => false,

// Пространства имен
'namespaces' => [],

// Globals
'globals' => [
'app' => \Bitrix\Main\Application::getInstance()
],

// Runtimes
'runtimes' => [],
)
)
)
Expand Down
17 changes: 14 additions & 3 deletions environments/dev/bitrix/.settings_extra.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,27 @@
//кеш хранится в уникальной директории. Должен быть полный абсолютный путь
'cache' => $_SERVER['DOCUMENT_ROOT'] . '/bitrix/cache/maximaster/tools.twig',

//Автообновление включается только в момент очистки кеша
'auto_reload' => isset( $_GET[ 'clear_cache' ] ) && strtoupper($_GET[ 'clear_cache' ]) == 'Y',
//Автообновление включается только в момент очистки кеша ИЛИ в режиме дебага
'auto_reload' => ((isset($_GET[ 'clear_cache' ]) && strtoupper($_GET[ 'clear_cache' ]) == 'Y')) || env('DEBUG', false),

//Автоэскейп отключен, т.к. битрикс по-умолчанию его сам делает
'autoescape' => false,

// Переменные arResult будут доступны не в result, а напрямую
'extract_result' => false,

// Пространства имен
'namespaces' => [],

// Globals
'globals' => [
'app' => \Bitrix\Main\Application::getInstance()
],

// Runtimes
'runtimes' => [],
)
)
)
),
);
);
17 changes: 14 additions & 3 deletions environments/prod/bitrix/.settings_extra.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,27 @@
//кеш хранится в уникальной директории. Должен быть полный абсолютный путь
'cache' => $_SERVER['DOCUMENT_ROOT'] . '/bitrix/cache/maximaster/tools.twig',

//Автообновление включается только в момент очистки кеша
'auto_reload' => isset( $_GET[ 'clear_cache' ] ) && strtoupper($_GET[ 'clear_cache' ]) == 'Y',
//Автообновление включается только в момент очистки кеша ИЛИ в режиме дебага
'auto_reload' => ((isset($_GET[ 'clear_cache' ]) && strtoupper($_GET[ 'clear_cache' ]) == 'Y')) || env('DEBUG', false),

//Автоэскейп отключен, т.к. битрикс по-умолчанию его сам делает
'autoescape' => false,

// Переменные arResult будут доступны не в result, а напрямую
'extract_result' => false,

// Пространства имен
'namespaces' => [],

// Globals
'globals' => [
'app' => \Bitrix\Main\Application::getInstance()
],

// Runtimes
'runtimes' => [],
)
)
)
),
);
);

0 comments on commit 52f9dad

Please sign in to comment.