基础篇11. 添加services,开启twig debug模式

OK龴龰龭龩龨龥龣龟龜龚龙Drupal console龴齵齳龰龭齲齮齪齦settings.local.php齑齎齍

齋齉39齂龴鼾鼽鼹鼸鼷鼳齂鼯鼫鼽鼹鼧鼾鼣鼠鼟鼛鼙services齍(鼏鼎鼊鼟鼙鼈鼄龴鼾鼙鼯鼫鼀龴黿黻黺黹鼙齂黸鼽黴黰黭黫黧龴黤黣鼈黠黻黟黝黜)

/**
 * Enable local development services.
 */
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';

龰龭麤麣麟麛麙鼳麛齂鼯鼫龴麗麖麟麒齑麎鼀鼙麌麋齍

/**
 * Enable local development services.
 */
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/default/local.services.yml';

鼳麌麄鼙麁鹽鹼鹻鹹龴鹸鹴鹱鹮鹬龰龭鹩鹨settings.local.php齑齎齍鹤鹮黣麒龙鼧鼾黰鹩鹨麛鹠鹞鹚鹗鹓鼙鹒鹻鹏鹋龴鹉黝鹆鹃鸿鸻鼙鸺鸹龴鸷黝鸳鸺鸹鹃鸿鸻齍黭鼹龴鸱麌鼙龴鼳鹠齑齎齋鹹git鸮鸫鼙鸨鸦黻黟鸣鸟鸝齍

鸙鸗龰龭鸔齋default齑齎鸐鼀鹩鹨麛鹠local.services.yml齑齎齍

鸌鸊齋齑齎鼀鸉鸅齑麎鼀鼙鼯鼫齍鸌鸃鷿齑齎齍

services:
  cache.backend.null:
    class: Drupal\Core\Cache\NullBackendFactory

parameters:
  twig.config:
    debug: true
    auto_reload: true
    cache: false

鼳鷩鼙9齂鼯鼫龴鹬鷧齂黣鷣鷢鷟鷿鹹鼙龴鷝黝鷜鸿齍鷙麒龰龭鷘鷕鷒鷏鸔鷌鷊鷉settings.local.php齑齎鼀鷊齂鷅鷃龨黴鷀鶼齍

齉7齂黣鼣鼠twig debug鶹鶶龴鼳麌鸳齋鶴鶳鶲鶰鶹鶭鼙鸨鸦鶪鶨鼾鶥鹹龙鶣麛鹠鶹鶭龴鸌鶡鼾麛鶝鶙鶘鹹鼙鶹鶭鹨鶔齍鷣鼎鶹鶭鹼鶹鶭鹨鶔龴龰龭鼹鸗鷒鸳鶑龴鼳鷩龴鼾鶎鷏黴鶌twig debug鶹鶶鼣鼠鶉鼽齍

齉8齂黣鹞鶆鶅鶂龴麖鶀鷏鹹鼷auto reload鼳鹠鵼齎龴鸌齋鵺鵷鵶鵴龟龜麖鼙鵰齎龴鼳黣麛鹠鵬鵫鵼齎齍

齉9齂黣鷣鷢鷟鷿齍

鸙鸗龰龭鶥鹹Drupal console鼙鵨鵤鷟鷿鵣鵟 drupal cr all 麤鵨鵤鷟鷿龴鼹鵞鵚鼳鹠鼟鼛鼙service齑齎齍

鷘鼷鵗鶲龴鶅鶂鶲鶰鼹鸗鼽鼹鼸鼷龴齋鼯鼫鵖鵒鵑鵍龴鵊龙鹸鵊鵉鵇鼙鵅鵂鼯鼫龴鼳鴾鴻鴺twig debug鴶鴳龥龣鼣鼠龙齍

本书共66小节:

评论 (写第一个评论)