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 龞龜鼼鹞龜鹛
  • 鹗鹔鹎鹌鹊鹆鹂麨鹁鸾鹌齔鸽鸼鹞龜鹛

评论 (写第一个评论)