Skip to content

Commit 91237c9

Browse files
committed
[FrameworkBundle] [Workflow] Fixed initial place config
1 parent 67acdb0 commit 91237c9

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

+1
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ private function addWorkflowSection(ArrayNodeDefinition $rootNode)
281281
->end()
282282
->end()
283283
->end()
284+
->scalarNode('initial_place')->defaultNull()->end()
284285
->arrayNode('places')
285286
->isRequired()
286287
->requiresAtLeastOneElement()

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

+3
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,9 @@ private function registerWorkflowConfiguration(array $workflows, ContainerBuilde
429429
'type' => $type,
430430
'marking_store' => isset($workflow['marking_store']['type']) ? $workflow['marking_store']['type'] : null,
431431
));
432+
if (isset($workflow['initial_place'])) {
433+
$definitionDefinition->addArgument($workflow['initial_place']);
434+
}
432435

433436
// Create MarkingStore
434437
if (isset($workflow['marking_store']['type'])) {

src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd

+1
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@
242242
<xsd:element name="transitions" type="transitions" />
243243
</xsd:sequence>
244244
<xsd:attribute name="name" type="xsd:string" />
245+
<xsd:attribute name="initial-place" type="xsd:string" />
245246
</xsd:complexType>
246247

247248
<xsd:complexType name="marking_store">

0 commit comments

Comments
 (0)