8000 minor #20490 [FrameworkBundle] [Workflow] fixed initial place config … · symfony/symfony@1b6b08c · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b6b08c

Browse files
committed
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 | #20458 (comment) | License | MIT | Doc PR | ~ Commits ------- 91237c9 [FrameworkBundle] [Workflow] Fixed initial place config
2 parents 67acdb0 + 91237c9 commit 1b6b08c

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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)
0