tastaturberuf / contao-interfaces
Contao开源CMS的接口
1.0
2021-04-07 15:10 UTC
Requires
- php: >=7.2
This package is auto-updated.
Last update: 2024-09-15 18:49:42 UTC
README
这个库可以帮助您始终获取所有钩子和回调的正确参数。这个集合仅包含接口类。
所有钩子都以Hook
结尾,所有回调都以Callback
结尾。
易于使用
use Tastaturberuf\ContaoInterfaces\Hooks\LoadDataContainerHook; class MyEventListener implements LoadDataContainerHook { public function onLoadDataContainer(string $table) : void { // Do something } }
仍然使用注解
use Contao\CoreBundle\ServiceAnnotation\Hook; use Tastaturberuf\ContaoInterfaces\Hooks\LoadDataContainerHook; use Terminal42\ServiceAnnotationBundle\ServiceAnnotationInterface; class MyEventListener implements LoadDataContainerHook, ServiceAnnotationInterface { /** * @Hook("loadDataContainer", priority=1337) */ public function onLoadDataContainer(string $table) : void { // Do something } }
如果您有任何问题,请随时贡献或提交一个问题。