- Drupal 8 Module Development
- Daniel Sipos
- 124字
- 2021-07-02 15:45:21
Tokens
The last thing we will cover in this chapter is the Token API in Drupal 8. We will cover a few theories 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.
推薦閱讀
- 從零開始構建企業級RAG系統
- 零基礎學Visual C++第3版
- PHP 7底層設計與源碼實現
- ASP.NET Core Essentials
- 我的第一本算法書
- 算法大爆炸:面試通關步步為營
- Python Tools for Visual Studio
- Hands-On C++ Game Animation Programming
- PHP+MySQL網站開發項目式教程
- .NET 4.5 Parallel Extensions Cookbook
- Arduino電子設計實戰指南:零基礎篇
- JavaScript前端開發基礎教程
- Mastering Node.js
- Puppet Cookbook(Third Edition)
- Django 3 Web應用開發從零開始學(視頻教學版)