This issue is for adding the @Event tag and appropriate documentation to the following list of events.
$this->eventDispatcher->dispatch(ConfigEvents::DELETE, new ConfigCrudEvent($this));
$this->eventDispatcher->dispatch(ConfigEvents::SAVE, new ConfigCrudEvent($this));
$this->eventDispatcher->dispatch(ConfigEvents::RENAME, new ConfigRenameEvent($config, $old_name));
$this->eventDispatcher->dispatch(ConfigEvents::IMPORT, new ConfigImporterEvent($this));
$this->eventDispatcher->dispatch(ConfigEvents::IMPORT_VALIDATE, new ConfigImporterEvent($this));
$this->eventDispatcher->dispatch(ConfigEvents::COLLECTION_INFO, $this->configCollectionInfo);
This documentation should include the following information:
- What the event is
- What it is used for
- What kind of $event object is passed along.
- @see links to related classes (event class, representative class where event is dispatched, representative class where event is subscribed to).
See the parent issue for a documentation template, and more information: #2382169: [meta] Add @Event to all events defined by drupal core
Compact beta evaluation: Unfrozen - API docs only
Comments
Comment #1
eojthebraveComment #2
eojthebraveComment #3
eojthebraveHere is a first pass at writing the expanded documentation for these events. The RENAME event doesn't have anything in core that is currently subscribed to it other than a test that tests to make sure the event fires/works, so I wasn't able to @see an example implementation for that one.
Comment #4
jhodgdonI do not think we use @var on const class members?
Other than that, this looks good!
Hm. I see that this is all over core. Probably doesn't hurt anything. Let's just go with it.
One other thing though, in the COLLECTION_INFO one:
Is that right? The other ones receive a *Event instance, and this one is not called *Event?
Comment #5
eojthebraveYeah, that one is correct. I initially was unsure as well. This
$this->eventDispatcher->dispatch(ConfigEvents::COLLECTION_INFO, $this->configCollectionInfo);is where it is dispatched, andclass ConfigCollectionInfo extends Eventso really just an inconsistent name I suppose.Comment #6
jhodgdonOK then, patch looks good in that case! Thanks!
Comment #7
alexpottCommitted 370e15e and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.