Skip to content

Commit

Permalink
feat: get transition array from workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
orlyapps committed Sep 16, 2021
1 parent 711534d commit dcf2e72
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Models/WorkflowDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit dcf2e72

Please sign in to comment.