This module allows developers to register event handlers for common CMS actions using the
silverstripe/event-dispatcher
API.
- Description: Any form submitted in the CMS
- Example: save, publish, unpublish, delete
- Listener:
SilverStripe\CMSEvents\Listener\Form\Listener
- Description: A
CMSMain
controller action - Example:
savetreenode
(reorder site tree) - Listener:
SilverStripe\CMSEvents\Listener\CMSMain\Listener
- Description: A standard GridField action invoked via a URL (
GridField_URLHandler
) - Example:
handleReorder
(reorder items) - Listener:
SilverStripe\CMSEvents\Listener\GridField\Action\Listener
- Description: A GridField action invoked via a URL (
GridField_ActionProvider
) - Example:
deleterecord
,archiverecord
- Listener:
SilverStripe\CMSEvents\Listener\GridField\Alteration\Listener
- Description: A scaffolded GraphQL mutation
- Example:
mutation createMyDataObject(Input: $Input)
- Listener:
SilverStripe\CMSEvents\Listener\GraphQL\Mutation\Listener
- Description: Any generic GraphQL operation
- Example:
mutation publishAllFiles
,query allTheThings
- Listener:
SilverStripe\CMSEvents\Listener\GraphQL\Middleware\Listener
SilverStripe\Core\Injector\Injector:
SilverStripe\EventDispatcher\Dispatch\Dispatcher:
properties:
handlers:
# arbitrary key
cmsForms:
on: [ formSubmitted.save ]
handler: %$MyProject\MySaveHandler
For more information on using the event dispatcher, read the event dispatcher documentation
- silverstripe/framework: ^4.5
$ composer require silverstripe/cms-events
See License
Bugs are tracked in the issues section of this repository. Before submitting an issue please read over existing issues to ensure yours is unique.
If the issue does look like a new bug:
- Create a new issue
- Describe the steps required to reproduce your issue, and the expected outcome. Unit tests, screenshots and screencasts can help here.
- Describe your environment as detailed as possible: SilverStripe version, Browser, PHP version, Operating System, any installed SilverStripe modules.
Please report security issues to the module maintainers directly. Please don't file security issues in the bugtracker.
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.