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 龠龟齈鹥龟鹤
  • 鹝鹜鹒鹑鹍鹌鹉麧鹈鹅鹑齘鹄鹂鹥龟鹤

评论 (写第一个评论)