minor #23700 [Workflow] add getter for workflow (Simperfit)
This PR was merged into the 3.4 branch.
Discussion
----------
[Workflow] add getter for workflow
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #23695
| License | MIT
| Doc PR |
Commits
-------
9910ba1ad4
[Workflow] feature: add getter in workflow
This commit is contained in:
commit
3b54ce8d7e
@ -54,4 +54,12 @@ class MultipleStateMarkingStore implements MarkingStoreInterface
|
||||
{
|
||||
$this->propertyAccessor->setValue($subject, $this->property, $marking->getPlaces());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getProperty()
|
||||
{
|
||||
return $this->property;
|
||||
}
|
||||
}
|
||||
|
@ -59,4 +59,12 @@ class SingleStateMarkingStore implements MarkingStoreInterface
|
||||
{
|
||||
$this->propertyAccessor->setValue($subject, $this->property, key($marking->getPlaces()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getProperty()
|
||||
{
|
||||
return $this->property;
|
||||
}
|
||||
}
|
||||
|
@ -26,4 +26,12 @@ final class ClassInstanceSupportStrategy implements SupportStrategyInterface
|
||||
{
|
||||
return $subject instanceof $this->className;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getClassName()
|
||||
{
|
||||
return $this->className;
|
||||
}
|
||||
}
|
||||
|
@ -186,6 +186,14 @@ class Workflow
|
||||
return $this->definition;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MarkingStoreInterface
|
||||
*/
|
||||
public function getMarkingStore()
|
||||
{
|
||||
return $this->markingStore;
|
||||
}
|
||||
|
||||
private function doCan($subject, Marking $marking, Transition $transition)
|
||||
{
|
||||
foreach ($transition->getFroms() as $place) {
|
||||
|
Reference in New Issue
Block a user