From ee6edba2067982a9968709f80a2378ab8e651d29 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 7 Aug 2024 14:18:16 +0200 Subject: [PATCH] Create isSigned method in EntityWorkflowStepSignature.php Refactorization and ease of use in template and workflow controller --- .../Entity/Workflow/EntityWorkflowStepSignature.php | 5 +++++ .../Resources/views/Workflow/_signature.html.twig | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStepSignature.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStepSignature.php index 46c8bb04d..527ede0ef 100644 --- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStepSignature.php +++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStepSignature.php @@ -135,4 +135,9 @@ class EntityWorkflowStepSignature implements TrackCreationInterface, TrackUpdate return $this; } + + public function isSigned(): bool + { + return EntityWorkflowSignatureStateEnum::SIGNED == $this->getState(); + } } diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_signature.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_signature.html.twig index ddccc6a4c..e439f2268 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_signature.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_signature.html.twig @@ -6,7 +6,7 @@
{{ s.signer|chill_entity_render_box }}