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

  • 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.

主站蜘蛛池模板: 屯门区| 江永县| 临洮县| 潼关县| 远安县| 开远市| 太原市| 德保县| 墨脱县| 和林格尔县| 原平市| 铜山县| 瑞昌市| 安国市| 阳山县| 格尔木市| 桃源县| 喜德县| 赫章县| 鄯善县| 荣昌县| 安丘市| 广元市| 荣昌县| 平远县| 三明市| 博爱县| 淳安县| 门头沟区| 札达县| 修武县| 青冈县| 彰化县| 宝丰县| 清苑县| 巴彦淖尔市| 河东区| 石首市| 涞源县| 宜都市| 阿图什市|