For developers
Both project list content elements, Projects and
Selected Projects, dispatch two PSR-14 events of this extension
and the plugin view event of academic_base. They are the supported
way to change what a plugin queries and what it renders, and they replace the
only alternative there used to be: subclassing
Project and
re-registering the plugin.
Which classes of this extension are public API, and what that promises, is stated for all academic extensions on the fgtclb/academic-base:developers-extension-points.
Nothing changes in an installation that has no listener: both plugins query and render exactly what they did before.
Events
| Event | Dispatched | What a listener can change | Owner |
|---|---|---|---|
| ModifyProjectDemandEvent | by both content elements, after the demand is built from the content element settings and the request and before the projects are queried | replace the demand | this extension |
| ModifyProjectListEvent | by both, after the query and before the view variables are assigned | replace the projects, replace the applicable categories, assign further view variables | this extension |
| ModifyPluginViewEvent | by both, once each time they render, after the action assigned its own variables | assign further view variables | academic_base |
One action,
Project, serves both content
elements, so all three events fire for both, in this order. Which one is
rendering is on the context every event carries, as the plugin name
Project or
Project.