8000 Workflow's CHANGELOG: Use PHP examples · symfony/symfony@0a59b50 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0a59b50

Browse files
Workflow's CHANGELOG: Use PHP examples
1 parent e12babf commit 0a59b50

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/Symfony/Component/Workflow/CHANGELOG.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@ CHANGELOG
66

77
* Trigger `entered` event for subject entering in the Workflow for the first time
88
* Added a context to `Workflow::apply()`. The `MethodMarkingStore` could be used to leverage this feature.
9-
* Added dump styling of states and transitions through `metadata`,
10-
configuration of places is:
11-
`label` and `description` (only for PUML) (text), `bg_color` (`#RRGGBB` or CSS color name)
12-
and configuration of transitions is:
13-
`label` (text), `color` and `arrow_color` (`#RRGGBB` or CSS color name)
9+
* Add style to transitions by declaring metadata:
10+
```
11+
$places = range('a', 'b');
12+
$transition = new Transition('t1', 'a', 'b');
13+
$transitions[] = $transition;
14+
$transitionsMetadata = new \SplObjectStorage();
15+
$transitionsMetadata[$transition] = [
16+
'color' => 'Red',
17+
'arrow_color' => '#00ff00',
18+
];
19+
$inMemoryMetadataStore = new InMemoryMetadataStore([], [], $transitionsMetadata);
20+
return new Definition($places, $transitions, null, $inMemoryMetadataStore);
21+
```
1422

15< 3F99 /td>23
4.1.0
1624
-----

0 commit comments

Comments
 (0)
0