Skip to content

Commit facbe1a

Browse files
committed
minor symfony#11041 Bootstraped the documentation of Workflow options (javiereguiluz)
This PR was squashed before being merged into the 3.4 branch (closes symfony#11041). Discussion ---------- Bootstraped the documentation of Workflow options I'm adding the missing workflow options as reported by symfony#7525. I'm only listing the options and their possible values. After merging, someone who knows this component must provide the actual docs for them. Commits ------- 5bf5ebd Bootstraped the documentation of Workflow options
2 parents acec154 + 5bf5ebd commit facbe1a

File tree

1 file changed

+146
-1
lines changed

1 file changed

+146
-1
lines changed

reference/configuration/framework.rst

Lines changed: 146 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Configuration
125125
* `https_port`_
126126
* `resource`_
127127
* `strict_requirements`_
128-
* `type`_
128+
* :ref:`type <reference-router-type>`
129129

130130
* `secret`_
131131
* `serializer`_
@@ -193,6 +193,20 @@ Configuration
193193
* `strict_email`_
194194
* `translation_domain`_
195195

196+
* `workflows`_
197+
198+
* :ref:`enabled <reference-workflows-enabled>`
199+
* :ref:`name <reference-workflows-name>`
200+
201+
* `audit_trail`_
202+
* `initial_place`_
203+
* `marking_store`_
204+
* `places`_
205+
* `supports`_
206+
* `support_strategy`_
207+
* `transitions`_
208+
* :ref:`type <reference-workflows-type>`
209+
196210
secret
197211
~~~~~~
198212

@@ -748,6 +762,8 @@ resource
748762
The path the main routing resource (e.g. a YAML file) that contains the
749763
routes and imports the router should load.
750764

765+
.. _reference-router-type:
766+
751767
type
752768
....
753769

@@ -2164,6 +2180,135 @@ lock
21642180
The default lock adapter. If not defined, the value is set to ``semaphore`` when
21652181
available, or to ``flock`` otherwise. Store's DSN are also allowed.
21662182

2183+
workflows
2184+
~~~~~~~~~
2185+
2186+
**type**: ``array``
2187+
2188+
A list of workflows to be created by the framework extension:
2189+
2190+
.. configuration-block::
2191+
2192+
.. code-block:: yaml
2193+
2194+
# config/packages/workflow.yaml
2195+
framework:
2196+
workflows:
2197+
my_workflow:
2198+
# ...
2199+
2200+
.. code-block:: xml
2201+
2202+
<!-- config/packages/workflow.xml -->
2203+
<?xml version="1.0" encoding="UTF-8" ?>
2204+
<container xmlns="http://symfony.com/schema/dic/services"
2205+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2206+
xmlns:framework="http://symfony.com/schema/dic/symfony"
2207+
xsi:schemaLocation="http://symfony.com/schema/dic/services
2208+
http://symfony.com/schema/dic/services/services-1.0.xsd
2209+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
2210+
2211+
<framework:config>
2212+
<framework:workflows>
2213+
<framework:workflow
2214+
name="my_workflow" />
2215+
</framework:workflows>
2216+
<!-- ... -->
2217+
</framework:config>
2218+
</container>
2219+
2220+
.. code-block:: php
2221+
2222+
// config/packages/workflow.php
2223+
$container->loadFromExtension('framework', [
2224+
'workflows' => [
2225+
'my_workflow' => // ...
2226+
],
2227+
]);
2228+
2229+
.. seealso::
2230+
2231+
See also the article about :doc:`using workflows in Symfony apps </workflow>`.
2232+
2233+
.. _reference-workflows-enabled:
2234+
2235+
enabled
2236+
.......
2237+
2238+
**type**: ``boolean`` **default**: ``false``
2239+
2240+
Whether to enable the support for workflows or not. This setting is
2241+
automatically set to ``true`` when one of the child settings is configured.
2242+
2243+
.. _reference-workflows-name:
2244+
2245+
name
2246+
....
2247+
2248+
**type**: ``prototype``
2249+
2250+
Name of the workflow you want to create.
2251+
2252+
audit_trail
2253+
"""""""""""
2254+
2255+
**type**: ``array``
2256+
2257+
initial_place
2258+
"""""""""""""
2259+
2260+
**type**: ``string`` **default**: ``null``
2261+
2262+
marking_store
2263+
"""""""""""""
2264+
2265+
**type**: ``array``
2266+
2267+
Each marking store can define any of these options:
2268+
2269+
* ``arguments`` (**type**: ``array``)
2270+
* ``service`` (**type**: ``string``)
2271+
* ``type`` (**type**: ``string`` **possible values**: ``'multiple_state'`` or
2272+
``'single_state'``)
2273+
2274+
places
2275+
""""""
2276+
2277+
**type**: ``array``
2278+
2279+
supports
2280+
""""""""
2281+
2282+
**type**: ``string`` | ``array``
2283+
2284+
support_strategy
2285+
""""""""""""""""
2286+
2287+
**type**: ``string``
2288+
2289+
transitions
2290+
"""""""""""
2291+
2292+
**type**: ``array``
2293+
2294+
Each marking store can define any of these options:
2295+
2296+
* ``from`` (**type**: ``string``)
2297+
* ``guard`` (**type**: ``string``) a :doc:`ExpressionLanguage </components/expression_language>`
2298+
compatible expression to block the transition
2299+
* ``name`` (**type**: ``string``)
2300+
* ``to`` (**type**: ``string``)
2301+
2302+
.. _reference-workflows-type:
2303+
2304+
type
2305+
""""
2306+
2307+
**type**: ``string`` **possible values**: ``'workflow'`` or ``'state_machine'``
2308+
2309+
Defines the kind fo workflow that is going to be created, which can be either
2310+
a :doc:`normal workflow </workflow/usage>` or a :doc:`state machine </workflow/state-machines>`.
2311+
21672312
.. _`HTTP Host header attacks`: http://www.skeletonscribe.net/2013/05/practical-http-host-header-attacks.html
21682313
.. _`Security Advisory Blog post`: https://symfony.com/blog/security-releases-symfony-2-0-24-2-1-12-2-2-5-and-2-3-3-released#cve-2013-4752-request-gethost-poisoning
21692314
.. _`Doctrine Cache`: http://docs.doctrine-project.org/projects/doctrine-common/en/latest/reference/caching.html

0 commit comments

Comments
 (0)