- Drupal 9 Module Development
- Daniel Sipos Antonio De Marco
- 225字
- 2021-06-11 18:36:04
Summary
In this chapter, we discussed many things. We saw how logging works in Drupal, how the mail API can be used programmatically (and extended), and how the token system can be employed to make our text more dynamic.
While going through this chapter, we also enriched our Hello World module. So, apart from understanding the theory about logging, we created our own logging channel service and logger plugin. For the latter, we decided to send out emails when log messages were of the error type. In doing this, we took a look at the Mail API and how we can use it programmatically. We saw that, by default, PHP's native mail() function is used to send out emails, but we can create our own plugin very easily to use whatever external service we want—yet another great example of extensibility via plugins.
Lastly, we looked at tokens in Drupal. We saw what components make up the API, how we can programmatically use existing tokens (replace them with the help of contextual data), and how we can define our own tokens for others to use. These are the main tenets of extensibility (and sharing)—using something someone else has exposed to you and exposing something for someone else to use.
In the next chapter, we will look at another great topic—theming.
- 游戲運營與出海實戰(zhàn):策略、方法與技巧
- 工業(yè)互聯(lián)網(wǎng):技術(shù)、實踐與行業(yè)解決方案
- 我是微商:月入50萬微商修煉筆記
- 電商行業(yè)微營銷實戰(zhàn)攻略
- 網(wǎng)上開店與創(chuàng)業(yè)寶典
- 商務(wù)智能實戰(zhàn)
- 打動人心:電商文案策劃與視覺營銷
- 網(wǎng)絡(luò)客戶服務(wù)與管理
- 天正TArch 2014建筑設(shè)計從入門到精通
- 首席視頻官:5G時代的短視頻布局與營銷革命
- 私域流量:從0到1搭建私域流量池的方法論
- 輕松搞定店鋪視覺
- 微商·微信·微店·朋友圈·自媒體·微營銷一本通
- 移動電商基礎(chǔ)與實務(wù)
- 教訓(xùn):互聯(lián)網(wǎng)創(chuàng)業(yè)必須避免的八大誤區(qū)