- Drupal 8 Module Development
- Daniel Sipos
- 237字
- 2021-07-02 15:45:19
Logging and Mailing
In the preceding chapter, we learned how to do some of the more common things most Drupal 8 module developers will have to know how to do, starting with the basics, that is, creating a Drupal module.
In this chapter, we will take things further and cover some other important tasks that a developer will have to perform.
- We will take a look at how logging works in Drupal 8. In doing so, we will cover some examples by expanding on our Hello World module.
- We will look at the Mail API in Drupal 8, namely, how we can send emails with the default setup (PHP mail). However, more than that, I will show you how to create your own email system to integrate with your (perhaps external) mail service; remember plugins? This will be yet another good example of using a plugin to extend existing capabilities.
- At the end of the chapter, we will also look at the Drupal 8 token system. We'll do so in the context of us being able to replace certain tokens with contextual data so that the emails we send out are a bit more dynamic.
By the end of this chapter, you should be able to add logging to your Drupal 8 module and feel comfortable sending emails programmatically. Additionally, you'll understand how tokens work, and as a bonus, see how you can define your own tokens.
推薦閱讀
- scikit-learn Cookbook
- AWS Serverless架構(gòu):使用AWS從傳統(tǒng)部署方式向Serverless架構(gòu)遷移
- Visual Basic程序設(shè)計(jì)教程
- Visual Basic程序設(shè)計(jì)(第3版):學(xué)習(xí)指導(dǎo)與練習(xí)
- UI智能化與前端智能化:工程技術(shù)、實(shí)現(xiàn)方法與編程思想
- Python神經(jīng)網(wǎng)絡(luò)項(xiàng)目實(shí)戰(zhàn)
- Learning ArcGIS Pro
- 機(jī)械工程師Python編程:入門、實(shí)戰(zhàn)與進(jìn)階
- 零基礎(chǔ)學(xué)Java(第4版)
- Ext JS 4 Web Application Development Cookbook
- 組態(tài)軟件技術(shù)與應(yīng)用
- Unity 2017 Mobile Game Development
- 詳解MATLAB圖形繪制技術(shù)
- Python機(jī)器學(xué)習(xí)算法與應(yīng)用
- 零基礎(chǔ)學(xué)C語言(升級版)