Drupal Module Development
The Open Drupal Drupal module development course provides you with fundamental knowledge of the Drupal 8 API. During this course you will build modules using Drupal 8 principles and Drupal API functions. While doing so, you also learn security aspects of Drupal module development.
- The lessons:
- The repository:
The Drupal module development course
This course is primarily aimed at Drupal back-end developers. But front-end developers will also benefit from this course.
You have half a year of experience building sites in Drupal or you have followed the OpenDrupal course Drupal fundamentals. You have at least one year experience with PHP and some experience with object oriented programming.
After participating in this course you can develop a Drupal module according to best practices and understand existing Drupal code. As part of a team of Drupal developers you can write a simple Drupal module and understand other people’s code.
After completing this course you can answer questions like:
- How do I set up a Drupal module?
- How do Drupal modules collaborate?
- What facilities does Drupal provide for creating forms?
- How do I save data using Drupal entities?
- What are Drupal plugins and how can they be used?
- Per participant a computer with a localhost server and a working Drupal 8 development environment.
- Access to the Internet
- Beamer or screen for presentation by the trainer.
This course is broken down in the lessons listed below. The total course will, in average, take 4 days of 6 hours each.
Lesson 1 and 2
- A Drupal module: A Drupal ‘Hello world’; The Drupal framework; The parts of a module.
- Popular applications: Create a custom block; Customize forms; Drupal-hooks.
- Content: Display node data; View modes; Other content entities; Entity queries.
- Routing: Routing for forms and pages; Route controllers;
- User and permissions: Roles; Permissions; Checking permissions.
- Caching: Caching principles; Tags, Context and max-age; Cache invalidation.
- Security: Fundamentals; Using Drupal’s security API.
- Menu: Menu items and other links.
- Configuration: Store and retrieve configuration; Configuration forms.
- More variables: Key-value store; Settings;
- Configuration management: Deploy a Drupal site; Configuration import and export.
- Multilingual: Interface translation; Multilingual content.
- Services: Using Drupal services; Dependency Injection; Traits.
- Plugins: Drupal plugins; The Plugin concept; Create a custom plugin;
- The page call: Page request and response; The Symfony event system.
- Theming: Render array; Theming layer; Twig templates; The Twig language.
- Install and update: Installation and update scripts.
- Custom plugins: Custom plugins; Develop a custom plugin type;
- Complex configuration: Configuration entities; Create a custom configuration entity.
During this course you will build two Drupal modules. The exercises are designed to put the most commonly used tools and patterns of the Drupal API into practice. An example of the completed exercises is available for reference.
Prepare as participant
To participate in this course, you need a local development environment with a working Drupal 8 installation. Using a localhost server is common practice when developing for Drupal.
Detailed set-up instructions are provide in the repository.
Prepare as trainer
To present this course, you need a local development environment with a working Drupal 8 installation. Detailed set-up instructions are provide in the repository.
If you find errors or have additions to the materials, feel free to contribute by creating a pull request.