- Learning Drupal 8
- Nick Abbott Richard Jones
- 182字
- 2021-07-16 09:36:54
Hooks
An important concept in Drupal is the concept of module hooks. A module can expose one or more hooks empowering other modules to modify its behavior.
This means that if a module doesn't do exactly what you want, you can use a hook to "hook into'' the process and change that module's behavior without having to change the original module code. Moreover, it means that when the original module whose behavior you have overridden gets updates, you'll be able to reap the benefits of the update while still keeping your modification(s) in place.
An example is hook_entity_update
—a hook that is called after anything (any entity) is saved. Other modules may want to perform an action of their own in response to an entity update, and so we will also implement this hook.
Implementing hooks in your own modules is beyond the scope of this getting started book, but it's important to understand the terminology that you will no doubt come across as you continue working with Drupal.
For much more detail about the available hooks in Drupal, visit https://api.drupal.org.
- ClickHouse性能之巔:從架構設計解讀性能之謎
- SoapUI Cookbook
- vSphere High Performance Cookbook
- INSTANT Mercurial SCM Essentials How-to
- 微服務從小白到專家:Spring Cloud和Kubernetes實戰
- 計算機應用基礎案例教程
- Android開發三劍客:UML、模式與測試
- Java圖像處理:基于OpenCV與JVM
- Mastering AWS Security
- RocketMQ實戰與原理解析
- Vue.js 3應用開發與核心源碼解析
- TypeScript 2.x By Example
- Scratch從入門到精通
- C語言王者歸來
- 小學生C++趣味編程從入門到精通