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

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.

主站蜘蛛池模板: 梅河口市| 米林县| 封开县| 兴隆县| 连山| 鱼台县| 高唐县| 唐山市| 纳雍县| 徐汇区| 门源| 小金县| 寿宁县| 洪江市| 长汀县| 庄浪县| 淮滨县| 彭水| 宁国市| 当阳市| 丘北县| 吴桥县| 上饶县| 曲松县| 大埔县| 赤壁市| 信阳市| 于都县| 封丘县| 海门市| 胶州市| 浙江省| 朝阳县| 静安区| 柳林县| 开鲁县| 旬阳县| 道孚县| 宁海县| 揭阳市| 将乐县|