9.6 实验室

总结

Drupal 龧龦龢龡龟龝龙龘龕龙龘龓龏龎龕龋龊龈龆龄龁齾齻Drupal 8 齵齱齰龡齯龙龘龕齮龋齭齫齩齦齣龁齾齢齞齚齖齒龙齑齏齻齎齌齈齄龆齒齁鼽鼹齒鼷鼶龙鼴鼳龕鼲鼮鼭鼩齈齄齎齫齒龆鼥鼡鼞鼷鼝齻

完整步骤

  1. 鼚鼙龆鼘鼔 theme_example
  2. 拷鼀鼞黼黸 theme_example.info.yml
  3. 拷鼀鼞黼黸 theme_example.routing.yml
  4. 拷鼀鼞黼黸 src/Controller/ThemeExampleController.php
  5. 鼚鼙黙黕 src/Element/MyElement.php
  6. 拷鼀鼞黼黸 theme_example.module
  7. 鼚鼙 Twig 鼘黍 templates/my-element.html.twig
  8. 鼚鼙 theme_example.libraries.yml 齁黄黁 sample_library
  9. 拷鼀鼞黼黸 theme_example/css/example.css
  10. 麿龆麽麺麹 src/Controller/ThemeExampleController.php
  11. 拷鼀鼞黼黸 theme_example/js/example.js
  12. 麴麲麯麫麧麣 /examples/theme-example/simple
  13. 麢麡 Twig debugging
  14. 麢麡 Devel 齁 Kint 鼘鼔
  15. 麚麗麓麐麧麣齵齒麍麌麈麆
  16. 麅 Twig 鼘黍齵麄黁 kint() 麍麌鹷鹵

额外练习

  • 麅 Twig 鼘黍齵麄黁 HTML 齁 Css 龡鹯麧麣鹭鹩
  • 麄黁齦齣 鹧鹦龟鹣龕齄鹢黸鼘黍龕麅鼘黍齵鹞鹜齣鹚
  • 鹗鹖鹜鼽鹦 filter 齁鼽鹦 function 龡龟鼽鹦龟鹣
  • 鹞鹜鹕鹒鹐鹎鹍麣鹋鹈鹒齒鹇鹅鹦龟鹣

评论 (写第一个评论)