Module Event Subscriber Create
module_event_subscriber_createCreate a Drupal event subscriber service class with a getSubscribedEvents method, defining the machine name, class, and events to respond to during module development.
Instructions
Create an event subscriber service with getSubscribedEvents method.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"machine_name": "<machine_name>",
"subscriber_name": "<subscriber_name>"
},
"name": "module_event_subscriber_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| events | No | ||
| class_name | No | ||
| machine_name | Yes | ||
| subscriber_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||