Book Image

Learning Drupal 8

By : Nick Abbott
Book Image

Learning Drupal 8

By: Nick Abbott

Overview of this book

Drupal 8 sets a new standard for ease of use, while offering countless new ways to tailor and deploy your content to the Web. Drupal 8 allows user to easily customize data structures, listings, and pages, and take advantage of new capabilities for displaying data on mobile devices, building APIs, and adapting to multilingual needs. The book takes you step by step through building a Drupal 8 website. Start with the basics, such as setting up a local “stack” development environment and installing your first Drupal 8 site, then move on to image and media handling, and extending Drupal modules. Push your knowledge by getting to grips with the modular nature of Drupal, and learning to extend it by adding new functionalities to create your new modules. By the end of the book, you will be able to develop and manage a modern and responsive website using Drupal.
Table of Contents (21 chapters)
Learning Drupal 8
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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