- HookEvents are not required to be placed in an extension (Theme, Module).
- They can be placed in the
App
namespace for example.
- They can be placed in the
- Hook names, types, areas and categories are all eliminated.
- Generic contracts are enforced through inheritance.
- Locations and IDs are unique because the classname is unique.
- Hooks now use more standard terminology:
HookEvent
andHookEventListener
instead of Subscriber and Provider (which were reversed from Symfony and therefore confusing). - The admin User Interface is MUCH simpler.
- HookEvents use the Symfony
EventDispatcher
instead of a customHookDispatcher
. - Zikula-specific dependencies have been removed so the bundle becomes useful within the Symfony ecosystem.
- The persistent object (
Connection
) is simplified to only three properties: hookEventClass, listenerClass, priority.
This new hook system is completely incompatible with the old Hooks system. In Zikula Core 3.1 the new system is
introduced as a Forward-Compatibility layer. This allows either system to be used, but they cannot connect to
each other. E.g. a new HookEvent
cannot trigger nor connect to an old Provider and a new HookEvenntListener
cannot
listen to nor respond to an old Subscriber.
The old system is deprecated and will all be removed in Core 4.0.0.