Layout Builder
GuideLayout Builder in Drupal
CourseManaging Media in Drupal
CourseMedia API in Drupal
CourseBreakpoint API in Drupal
CourseBuild Drupal Sites
GuideMigrating to Drupal
CourseExtend the Migrate API
CourseIn Drupal’s core library there are a number of utility functions and classes that, as a module developer, you will find make your task easier or less tedious.
Often, there's an existing Drush command that does most of what you want, but needs just a few tweaks or enhancements to make it meet your project requirements. Maybe the existing core Drush command has the functionality but lacks some additional validation. Or maybe you need to add an option to perform some application-specific debugging logic for all commands in a group.
Drush hooks can be used to alter, extend, and enhance existing Drush commands.
In this tutorial we'll:
- Learn how to alter a Drush command with code in a custom module
- Declare a validation hook that alters the
user:password
command with additional password validation logic
By the end of this tutorial you should be able to alter a Drush command provided by Drush core or a contributed module with your own custom code.
Back-end developers, and Drupal site builders, often find themselves having to perform the same UI steps over and over again, like exporting configuration, importing configuration changes, running cron, processing a large queue of jobs, indexing items for Search API, and more. Performing these tasks with Drush saves time and reduces the number of clicks required.
Drush core contains commands to execute all the most common tasks. Many contributed modules provide their own Drush commands to make interaction with the module's features, easier, faster, and scriptable.
In this tutorial we'll:
- Learn about the Drush core commands for common tasks like interacting with queues, performing database backups, and importing/exporting configuration
- Demonstrate how to find the Drush commands provided by contributed modules in your project
By the end of this tutorial you'll learn some popular commands for common tasks that'll speed up your daily work.