jeyroik / df-templates-triggers

此包最新版本(0.1.0)没有可用的许可证信息。

DF触发器的模板

0.1.0 2023-08-09 15:09 UTC

This package is auto-updated.

Last update: 2024-09-09 17:38:10 UTC


README

tests codecov.io Latest Stable Version Total Downloads Dependents

df-templates-triggers

DF触发器的模板

库提供 IContextTrigger

使用

$ts = new TemplateService();
$templates = $ts->getTemplates($someRepo, new ContextTrigger([
    ContextTrigger::FIELD__PARAMS => [
        ContextTrigger::PARAM__FOR => [
            IParam::FIELD__NAME => ContextTrigger::PARAM__FOR,
            IParam::FIELD__VALUE => ETrigger::Event
        ],
        ContextTrigger::PARAM__TRIGGER => [
            IParam::FIELD__NAME => ContextTrigger::PARAM__TRIGGER,
            IParam::FIELD__VALUE => $trigger
        ]
    ]
]));