-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
workflow.php
52 lines (48 loc) · 1.97 KB
/
workflow.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
use Symfony\Component\Workflow\CacheWarmer\DefinitionValidatorCacheWarmer;
use Symfony\Component\Workflow\EventListener\ExpressionLanguage;
use Symfony\Component\Workflow\MarkingStore\MethodMarkingStore;
use Symfony\Component\Workflow\Registry;
use Symfony\Component\Workflow\StateMachine;
use Symfony\Component\Workflow\Workflow;
return static function (ContainerConfigurator $container) {
$container->services()
->set('workflow.abstract', Workflow::class)
->args([
abstract_arg('workflow definition'),
abstract_arg('marking store'),
service('event_dispatcher')->ignoreOnInvalid(),
abstract_arg('workflow name'),
abstract_arg('events to dispatch'),
])
->abstract()
->set('state_machine.abstract', StateMachine::class)
->args([
abstract_arg('workflow definition'),
abstract_arg('marking store'),
service('event_dispatcher')->ignoreOnInvalid(),
abstract_arg('workflow name'),
abstract_arg('events to dispatch'),
])
->abstract()
->set('workflow.marking_store.method', MethodMarkingStore::class)
->abstract()
->set('workflow.registry', Registry::class)
->alias(Registry::class, 'workflow.registry')
->set('workflow.security.expression_language', ExpressionLanguage::class)
->set('workflow.cache_warmer.definition_validator', DefinitionValidatorCacheWarmer::class)
->args([
abstract_arg('definition and validators'),
])
->tag('kernel.cache_warmer')
;
};