[5.0] New onAfterInitialiseDocument event#40512
Conversation
|
Merge it! |
|
Note: I have removed Event classes from this PR, it is better to do separately, with all Application events. |
Nope, all new events must have a corresponding class, also you don't provide the $document in the event now. please revert your cleanup again. |
I fully agree, but unfortunately here we have to wait when Application event classes will be implemented. I mean that PR should go first. Then classes can be added in this one. |
|
I have re-added the event class, now it will work with #40522, |
Conflicts: libraries/src/Application/ApiApplication.php
|
thanks |
|
maybe we get a manual.joomla.org entry please? |
|
I will make it. |
* Document event: BeforeCompileHeadEvent * Document event: AfterInitialiseDocumentEvent * Document event, phpcs * Document event, revert classes * Document event, cleanup * Document event, AfterInitialiseDocument Event
* Document event: BeforeCompileHeadEvent * Document event: AfterInitialiseDocumentEvent * Document event, phpcs * Document event, revert classes * Document event, cleanup * Document event, AfterInitialiseDocument Event
Summary of Changes
The event that everyone waiting for :)
This should finally solve an issue everyone hit when need to access to Document at early stage, but
onAfterRoutedocument not available andonAfterDispatchis to late.PR also add a general Document event class, it introduce classes for 2 events:AfterInitialiseDocumentEvent,BeforeCompileHeadEventNoteBefore we can merge this PR it would be good to add CMS\ApplicationEvent, and the document event should be a child of it (because technically it is Application event).Thoughts?
Testing Instructions
Apply #40522 then apply current patch. Solve conflicts.
Add in any System plugin:
Actual result BEFORE applying this Pull Request
Nothing
Expected result AFTER applying this Pull Request
You should see Dump output.
Link to documentations
Please select: