Event details
D8 Module Development introduces the coding concepts behind Drupal 8 and prepares you to tackle feature development beyond what is available through core and contributed modules. This platform is built in PHP and utilizes Symfony components to extend its accessibility to non-Drupal programmers. If you know how to configure a Drupal 8 site, but you've found limitations with what you can do with core and contributed modules; you are part of a new Drupal 8 implementation team, or you will be taking over on-going maintenance of a site built by a third party development group - this course will prepare you to manage any customizations required.
Duration: 2 days
Course Prerequisites
In order to get the most out of this course, you should have prior experience in Site Building with Drupal. A combination of Acquia's Introduction to Drupal 8 (or What's New in Drupal 8) and Building Websites with Drupal 8 would be ideal preparation for those with no prior Drupal experience. While you don't need to be an expert in PHP, you understand the basic constructs of programming enough to work with a new language.
- Drupal Site building
- Experience with programming in PHP
Course Objectives
During this course, you will build a series of modules that extend the core functionality of Drupal 8.
Describe Drupal's hook system and increasingly object-based development architecture
Articulate the construction of Drupal modules
Insert and extract data using Drupal's core database abstraction layer.
Employ and articulate best practices, conventions, and coding standards
Course Outline
Drupal Module Development Fundamentals
- About the Drupal Framework
- The Page Call Process
- Object Oriented Programming
- MVC, Controllers, and Routing
- Services and the Services Container
- Hooks and Plugins in Drupal
- Drupal Formatting and Coding Standards
Creating your First Module
- Module Naming, Location and Basic Requirements
- Creating a Module
- Implementing a Hook
- Adding Pages and Menu Items
Building a Fully Functional RSVP List Module
- Defining Module Requirements
- Creating a Form
- Creating an Install File
- Database Integration 1
- Permissions
- Block and Theme Systems
- Building the Administrative Settings Page
- Reporting Results
- Altering the Node Edit Form
- Database Integration 2
Automated Testing
- Using the Simpletest module
- Writing Functional Tests with SimpleTest
- Using PHPUnit
- Writing Tests for Classes with PHPUnit
Using Drush and the Drupal Console
How would you do that in Drupal?
- Real-Life Design Considerations
- Wrap-up