diff --git a/src/Models/WorkflowDefinition.php b/src/Models/WorkflowDefinition.php index c4075b1..e2fd1a2 100644 --- a/src/Models/WorkflowDefinition.php +++ b/src/Models/WorkflowDefinition.php @@ -67,6 +67,15 @@ function ($place) { } ); } + + public function transistionsOptionArray() + { + return $this->toArray()['transitions']->mapWithKeys( + function ($place) { + return [array_key_first($place) => head($place)['metadata']['title']]; + } + ); + } public function place($placeName)