minor #20490 [FrameworkBundle] [Workflow] fixed initial place config (HeahDude)

This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] [Workflow] fixed initial place config

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20458#issuecomment-259950141
| License       | MIT
| Doc PR        | ~

Commits
-------

91237c9 [FrameworkBundle] [Workflow] Fixed initial place config
This commit is contained in:
Grégoire Pineau 2016-11-15 15:33:10 +01:00
commit 1b6b08cf0b
3 changed files with 5 additions and 0 deletions

View File

@ -281,6 +281,7 @@ class Configuration implements ConfigurationInterface
->end()
->end()
->end()
->scalarNode('initial_place')->defaultNull()->end()
->arrayNode('places')
->isRequired()
->requiresAtLeastOneElement()

View File

@ -429,6 +429,9 @@ class FrameworkExtension extends Extension
'type' => $type,
'marking_store' => isset($workflow['marking_store']['type']) ? $workflow['marking_store']['type'] : null,
));
if (isset($workflow['initial_place'])) {
$definitionDefinition->addArgument($workflow['initial_place']);
}
// Create MarkingStore
if (isset($workflow['marking_store']['type'])) {

View File

@ -242,6 +242,7 @@
<xsd:element name="transitions" type="transitions" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="initial-place" type="xsd:string" />
</xsd:complexType>
<xsd:complexType name="marking_store">