-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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
onAfterRoute
document not available andonAfterDispatch
is to late.PR also add a general Document event class, it introduce classes for 2 events:AfterInitialiseDocumentEvent
,BeforeCompileHeadEvent
NoteBefore 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: