基础篇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鵏鵎龧龤鼶鼵龚齚

本书共42小节:

评论 (写第一个评论)