- Drupal 8 Module Development
- Daniel Sipos
- 127字
- 2021-07-02 12:22:45
Tokens
The last thing we will cover in this chapter is the Token API in Drupal 8. We will cover a few bits of theory and, as usual, demonstrate them via examples on our existing Hello World module code. We will do this in the context of the mails we are sending out for error logs.
It would be nice if we could include some personalized information in the mail text without having to hardcode it in the module code or configuration. For example, in our case, we might want to include in the email the username of the current user that is triggering the error log that is being emailed.
Let's first understand how the Token API works, before going into our Hello World module.
推薦閱讀
- HTML5+CSS3王者歸來
- FuelPHP Application Development Blueprints
- MATLAB圖像處理超級學習手冊
- Visual FoxPro 程序設(shè)計
- Python從入門到精通(精粹版)
- 信息安全技術(shù)
- Protocol-Oriented Programming with Swift
- Machine Learning With Go
- 微課學人工智能Python編程
- Scala編程實戰(zhàn)
- Learning Nessus for Penetration Testing
- Java EE Web應用開發(fā)基礎(chǔ)
- Deep Learning for Natural Language Processing
- Learning Cocos2d-JS Game Development
- Node.js Web Development