官术网_书友最值得收藏!

  • Drupal 9 Module Development
  • Daniel Sipos Antonio De Marco
  • 226字
  • 2021-06-11 18:36:03

Chapter 3: Logging and Mailing

In the previous chapter, we learned about some of the more common things most Drupal module developers will have to know, starting with the basics, that is, creating a Drupal module.

In this chapter, we will take things further and cover some other important tasks a developer will have to perform:

  • We will take a look at how logging works in Drupal 9. In doing so, we will cover some examples by expanding on our Hello World module.
  • We will look at the Mail API in Drupal, 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 token system. We'll do so in the context of us replacing 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 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.

主站蜘蛛池模板: 江西省| 葫芦岛市| 吉首市| 星座| 黎城县| 茂名市| 南丰县| 铜山县| 汾西县| 天祝| 安龙县| 忻城县| 扎赉特旗| 本溪| 六枝特区| 资溪县| 苗栗市| 兴义市| 兰西县| 周口市| 进贤县| 曲靖市| 靖州| 舞钢市| 商洛市| 手机| 进贤县| 剑川县| 溧水县| 隆回县| 英山县| 陕西省| 申扎县| 庆城县| 深州市| 绥江县| 澄迈县| 云浮市| 西华县| 南汇区| 昌江|