8000 [Workflow] config doc · symfony/symfony-docs@6b4f98a · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b4f98a

Browse files
[Workflow] config doc
1 parent 775f22b commit 6b4f98a

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

reference/configuration/framework.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ Configuration
233233
* :ref:`name <reference-workflows-name>`
234234

235< 8000 /code>235
* `audit_trail`_
236-
* `initial_place`_
236+
* `initial_marking`_
237237
* `marking_store`_
238238
* `places`_
239239
* `supports`_
@@ -2657,12 +2657,12 @@ audit_trail
26572657
If set to ``true``, the :class:`Symfony\\Component\\Workflow\\EventListener\\AuditTrailListener`
26582658
will be enabled.
26592659

2660-
initial_place
2661-
"""""""""""""
2660+
initial_marking
2661+
"""""""""""""""
26622662

2663-
**type**: ``string`` **default**: ``null``
2663+
**type**: ``string`` | ``array``
26642664

2665-
One of the ``places`` or ``null``. If not null and the supported object is not
2665+
One of the ``places`` or ``empty``. If not null and the supported object is not
26662666
already initialized via the workflow, this place will be set.
26672667

26682668
marking_store
@@ -2674,8 +2674,7 @@ Each marking store can define any of these options:
26742674

26752675
* ``arguments`` (**type**: ``array``)
26762676
* ``service`` (**type**: ``string``)
2677-
* ``type`` (**type**: ``string`` **possible values**: ``'multiple_state'`` or
2678-
``'single_state'``)
2677+
* ``type`` (**type**: ``string`` **allow value**: ``'method'``)
26792678

26802679
places
26812680
""""""

workflow.rst

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ like this:
5454
audit_trail:
5555
enabled: true
5656
marking_store:
57-
type: 'multiple_state' # or 'single_state'
58-
arguments:
57+
type: 'method'
58+
property:
5959
- 'currentPlace'
6060
supports:
6161
- App\Entity\BlogPost
62-
initial_place: draft
62+
initial_marking: draft
6363
places:
6464
- draft
6565
- reviewed
@@ -134,8 +134,8 @@ like this:
134134
'enabled' => true
135135
],
136136
'marking_store' => [
137-
'type' => 'multiple_state', // or 'single_state'
138-
'arguments' => ['currentPlace']
137+
'type' => 'method'
138+
'property' => ['currentPlace']
139139
],
140140
'supports' => ['App\Entity\BlogPost'],
141141
'places' => [
@@ -177,18 +177,6 @@ As configured, the following property is used by the marking store::
177177
public $content;
178178
}
179179

180-
.. note::
181-
182-
The marking store type could be "multiple_state" or "single_state". A single
183-
state marking store does not support a model being on multiple places at the
184-
same time.
185-
186-
.. tip::
187-
188-
The ``type`` (default value ``single_state``) and ``arguments`` (default
189-
value ``marking``) attributes of the ``marking_store`` option are optional.
190-
If omitted, their default values will be used.
191-
192180
.. tip::
193181

194182
Setting the ``audit_trail.enabled`` option to ``true`` makes the application

workflow/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Below is the configuration for the pull request state machine.
7979
type: 'state_machine'
8080
supports:
8181
- App\Entity\PullRequest
82-
initial_place: start
82+
initial_marking: start
8383
places:
8484
- start
8585
- coding

0 commit comments

Comments
 (0)
0