mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Refactor workflow guard logic and add internal methods
Removed guard logic from EntityWorkflowTransitionEventSubscriber and created a new EntityWorkflowGuardTransition class for separation of concerns. Marked several setter methods in EntityWorkflowStepSignature as internal to guide proper usage. Added comprehensive tests to ensure the new guard logic functions correctly.
This commit is contained in:
@@ -105,6 +105,11 @@ class EntityWorkflowStepSignature implements TrackCreationInterface, TrackUpdate
|
||||
return $this->state;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*
|
||||
* @internal You should not use this method directly, use @see{Chill\MainBundle\Workflow\SignatureStepStateChanger} instead
|
||||
*/
|
||||
public function setState(EntityWorkflowSignatureStateEnum $state): EntityWorkflowStepSignature
|
||||
{
|
||||
$this->state = $state;
|
||||
@@ -117,6 +122,11 @@ class EntityWorkflowStepSignature implements TrackCreationInterface, TrackUpdate
|
||||
return $this->stateDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*
|
||||
* @internal You should not use this method directly, use @see{Chill\MainBundle\Workflow\SignatureStepStateChanger} instead
|
||||
*/
|
||||
public function setStateDate(?\DateTimeImmutable $stateDate): EntityWorkflowStepSignature
|
||||
{
|
||||
$this->stateDate = $stateDate;
|
||||
@@ -129,6 +139,11 @@ class EntityWorkflowStepSignature implements TrackCreationInterface, TrackUpdate
|
||||
return $this->zoneSignatureIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
*
|
||||
* @internal You should not use this method directly, use @see{Chill\MainBundle\Workflow\SignatureStepStateChanger} instead
|
||||
*/
|
||||
public function setZoneSignatureIndex(?int $zoneSignatureIndex): EntityWorkflowStepSignature
|
||||
{
|
||||
$this->zoneSignatureIndex = $zoneSignatureIndex;
|
||||
|
Reference in New Issue
Block a user