#5434 - Standardize hooks for actualisations

  • By
  • Added
  • 9 views
Identifier #5434
Issue type Feature request or suggestion
Title Standardize hooks for actualisations
Status Open
Tags

Risk: Core rearchitecting (custom)

Roadmap: Over the horizon (custom)

Handling member Deleted
Addon core
Description Make a standard where every actualisation (add/edit/remove) function for content can trigger actualisation hooks. Hooks should support pre-actualisation (where parameters can be modified or errors thrown for validation) and post-actualisation. Composr should not crash when hooks do not exist. Hooks should also support an info function which can define an order of execution (or use priority instead).

By having this system, we can significantly reduce the need for contentious_overrides (very nice, but unreliable for IDE code checking and can easily break when source code is changed) or sources_custom for addons. We can also reduce many addon-based clauses within sources files by moving them to these hooks (which means, for example, clauses for the points addon in the code for feedback would no longer exist on PHP runtime when the points addon is not installed since the hooks don't exist).
Steps to reproduce

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated