preloader

Drupal is the most popular modular content management system (CMS) in the PHP eco-system. IIn this course you learn how to develop modules for Drupal 8 and 9.

Drupal

MEETINGS

Check Schedule

DURATION

4 hours

FEE

Originally $180, now discounted to $90

About Course

First introduced in 2001 by Dries Buytaert, Drupal is the most popular modular content management system (CMS) in the PHP eco-system. Its wealth of modules gives it power and flexibility beyond any other CMS. In this course you learn how to develop modules for Drupal 8 and 9.

Detailed Course Outline

Drupal Overview

This unit includes the following topics:

  • Welcome!
  • Drupal Module Development

Drupal Development Perspective

Before diving into module development, this unit provides you with a high level overview of Drupal.

This unit includes the following topics:

  • Development Perspective
  • What is Drupal?
  • Drupal Layers
  • Drupal Installation
  • Drupal Admin GUI
  • Drupal Admin GUI
  • Module Development Considerations
  • PHP Knowledge Prerequisites
  • Module Development Overview
  • Module Development Overview

Module Development Quick Start

One of the best ways to get started quickly with Drupal module development is to use an appropriate development tool.

This unit includes the following topics:

  • Module Development Quickstart
  • Development Tools: Drupal Console
  • Development Tools: Drush
  • Development Tools: DCG
  • Module Development Quickstart
  • Module Development Quickstart: Generator
  • Module Development Quickstart: Module Type
  • Module Development Quickstart: Module Type
  • Module Development Quickstart: *.info.yml
  • Module Development Quickstart: Other *.yml
  • Module Development Quickstart: Done
  • Module Development Quickstart: Followup
  • Module Development Quickstart: Module Structure
  • Lab: Quickstart
  • Lab: Quickstart Continued

Module Infrastructure

Drupal modules require a specific infrastructure: a place to put module files, configuration files and so forth.

This unit includes the following topics:

  • Module Infrastructure
  • Module Naming
  • Module Placement
  • Module Registration
  • *.info.yml File
  • *.info.yml File: Compatibility
  • *.info.yml File Example
  • composer.json File
  • Example composer.json File
  • Does the Module Appear?
  • Lab: Infrastructure

Drupal Controllers

In this unit you learn about Drupal controllers and how to add one to a module.

This unit includes the following topics:

  • Module Controller
  • What is a Controller?
  • Controller Class: Naming and Placement
  • ControllerBase Class
  • Returning Output
  • Controller Skeleton
  • Grabbing Request Parameters
  • Request Parameter Example
  • Lab: Controllers

Drupal Routing

A website visitor needs to have a way to access your new module and controller. This is accomplished through a process referred to as _routing_.

This unit includes the following topics:

  • Drupal Routing
  • What is Routing?
  • Routing Example
  • Route Parameters
  • Routing Parameters Example
  • Routing Parameters and the Controller
  • Route Parameter Control
  • Advanced Routing
  • Routing Based on HTTP Method
  • Routing Based on HTTP Method
  • Lab: Drupal Routing

Drupal Menu Links

Once you have created a controller, and have defined a route, often the next step is to add a menu link.

This unit includes the following topics:

  • Drupal Menu Links
  • About Menu Links
  • Menu Via Admin GUI
  • Menu Via Admin GUI
  • Menu Via Admin GUI
  • Menu Via Admin GUI
  • Permanent Link
  • Permanent Link Options
  • Permanent Link Example
  • Permanent Link Example
  • Lab: Menu Links

Drupal Forms

One of the primary ways web developers capture information from website visitors is to present an HTML _form_. In addition, Drupal uses forms to configure modules.

This unit includes the following topics:

  • Drupal Forms
  • Forms Overview: Interface
  • Forms Overview: Base Classes
  • Forms Overview: Generic Structure
  • Forms Building: buildForm()
  • Forms Building: buildForm()
  • Forms Building: Elements
  • Forms Building: Element Example
  • Form Validation
  • Form Validation: Per Form
  • Form Validation: Per Element
  • Form Submission
  • Form Routing
  • Form Example
  • Forms and Controllers
  • Lab: Forms

Database Access

You can access the Drupal database itself, or any other databases using the Drupal Database API.

This unit includes the following topics:

  • Database Access
  • Database Configuration
  • Replicated Database Configuration
  • Other Database Configuration
  • Database Connection
  • Drupal\Core\Database\Connection
  • Using the Connection
  • Using the Connection Continued
  • Dynamic Queries
  • Dynamic Queries: select()
  • Dynamic Queries: select()
  • Dynamic Queries: select()
  • Dynamic Queries: Simple Conditions
  • Dynamic Queries: Simple Conditions
  • Dynamic Queries: Complex Conditions
  • Inserting Data
  • Dynamic Queries: update()
  • Dynamic Queries: update()
  • Dynamic Queries: delete()
  • Lab: Database

Custom Blocks

Blocks are a convenient way of encapuslating functionality that can later easily be managed via the Drupal Admin GUI.

This unit includes the following topics:

  • Custom Blocks
  • What is a Drupal Block?
  • Creating a Custom Block
  • Custom Block Placement 1
  • Custom Block Placement 2
  • Custom Block Placement 3
  • Custom Block Placement 4
  • Custom Block Placement 5
  • Block Form
  • LoginBlock Class
  • LoginBlock Class Continued
  • Login Form Block Output
  • Lab: Custom Blocks

Module Configuration

Module configuration in Drupal can take two forms: static default configuration hard coded into a configuration file, or dynamic configuration accessible via the admin GUI.

This unit includes the following topics:

  • Module Configuration
  • Default Configuration
  • Default Configuration Usage
  • Default Configuration Example
  • Dynamic Configuration
  • Building the Settings Form
  • Creating the Settings Form with Drush
  • Settings Form Route
  • Settings Form Menu Link
  • Settings Form Class
  • Settings Form Class: buildForm()
  • Settings Form Class: validateForm()
  • Settings Form Class: submitForm()
  • Settings Form Placement
  • Settings Form Display
  • Lab: Module Configuration

Instructor

instructor

Andrew Caya

Senior Instructor

Related Courses

course thumb

Linux for PHP

In this course you learn how to deploy to the cloud from a source code repository, implement a Lambda Serverless Function, automate PHP framework installation and create an Instant eCommerce website using the revolutionary Linux for PHP technology.

Pick Date
course thumb
  • New for 2021

PHP 8 Certified Cloud Technician

PHP Continuous Learning has released an exciting series of new courses designed to help you jump start your career in web development as a PHP 8 Certified Cloud Technician.

Pick Date
course thumb

Drupal Module Development

Drupal is the most popular modular content management system (CMS) in the PHP eco-system. In this course you learn how to develop modules for Drupal 8 and 9.

Pick Date