Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3174996
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3174996
Commits
c05b5bf5
Commit
c05b5bf5
authored
12 years ago
by
catch
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1843034
by Cottser, japerry, heyrocker, steveoliver, c4rl: Make Twig settings configurable.
parent
05d0b5a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/lib/Drupal/Core/CoreBundle.php
+3
-5
3 additions, 5 deletions
core/lib/Drupal/Core/CoreBundle.php
sites/default/default.settings.php
+36
-0
36 additions, 0 deletions
sites/default/default.settings.php
with
39 additions
and
5 deletions
core/lib/Drupal/Core/CoreBundle.php
+
3
−
5
View file @
c05b5bf5
...
...
@@ -368,7 +368,7 @@ protected function registerTwig(ContainerBuilder $container) {
// This is saved / loaded via drupal_php_storage().
// All files can be refreshed by clearing caches.
// @todo ensure garbage collection of expired files.
'cache'
=>
TRUE
,
'cache'
=>
settings
()
->
get
(
'twig_cache'
,
TRUE
)
,
'base_template_class'
=>
'Drupal\Core\Template\TwigTemplate'
,
// @todo Remove in followup issue
// @see http://drupal.org/node/1712444.
...
...
@@ -376,10 +376,8 @@ protected function registerTwig(ContainerBuilder $container) {
// @todo Remove in followup issue
// @see http://drupal.org/node/1806538.
'strict_variables'
=>
FALSE
,
// @todo Maybe make debug mode dependent on "production mode" setting.
'debug'
=>
TRUE
,
// @todo Make auto reload mode dependent on "production mode" setting.
'auto_reload'
=>
FALSE
,
'debug'
=>
settings
()
->
get
(
'twig_debug'
,
FALSE
),
'auto_reload'
=>
settings
()
->
get
(
'twig_auto_reload'
,
NULL
),
))
->
addMethodCall
(
'addExtension'
,
array
(
new
Definition
(
'Drupal\Core\Template\TwigExtension'
)))
// @todo Figure out what to do about debugging functions.
...
...
This diff is collapsed.
Click to expand it.
sites/default/default.settings.php
+
36
−
0
View file @
c05b5bf5
...
...
@@ -283,6 +283,42 @@
*/
$settings
[
'update_free_access'
]
=
FALSE
;
/**
* Twig debugging:
*
* When enabled, you can use the 'dump' function in Twig templates to output
* information about variables, and templates are automatically recompiled
* whenever the source code changes.
*
* @see http://drupal.org/node/1906392
*
* Not recommended in production environments (Default: FALSE).
*/
# $settings['twig_debug'] = TRUE;
/**
* Twig auto-reload:
*
* Automatically recompile Twig templates whenever the source code changes. If
* you don't provide a value for twig_auto_reload, it will be determined based
* on the value of twig_debug.
*
* Not recommended in production environments (Default: NULL).
*/
# $settings['twig_auto_reload'] = TRUE;
/**
* Twig cache:
*
* By default, Twig templates will be compiled and stored in the filesystem to
* increase performance. Disabling the Twig cache will recompile the templates
* from source each time they are used. In most cases the twig_auto_reload
* setting above should be enabled rather than disabling the Twig cache.
*
* Not recommended in production environments (Default: TRUE).
*/
# $settings['twig_cache'] = FALSE;
/**
* External access proxy settings:
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment