In this section, we will learn how to define custom event, how to dispatch custom event and how to subscribe custom event. There will be following things which we we will see step wise step : Step 1 :- Create modulename.info.yml file where filename is "drupal_custom_events.info.yml" , here our module name is "drupal_custom_events". name: Drupal Custom Events type: module description: 'This module will guide us about drupal events.' package: Custom version: 1.0 core_version_requirement: ^8 || ^9 Step 2 :- Create a routing file drupal_custom_events.routing.yml where we will define a route and call a form. drupal_custom_events.custom_event_dispatch_form: path: 'event_dispatch_form' defaults: _form: '\Drupal\drupal_custom_events\Form\CustomEventDispatchForm' _title: 'Event Dispatch Form' requirements: _permission: 'administrator' Step 3:- Create a Events folder inside src folder then create a file "Cu...