Add users in cc in workflow: fix code style

This commit is contained in:
nobohan 2023-03-23 11:24:21 +01:00
parent 295406d9b7
commit a3db67fd1e
4 changed files with 14 additions and 8 deletions

View File

@ -228,7 +228,6 @@ class WorkflowController extends AbstractController
);
}
/**
* @Route("/{_locale}/main/workflow/list/cc", name="chill_main_workflow_list_cc")
*/

View File

@ -126,19 +126,19 @@ class EntityWorkflowStep
$this->accessKey = bin2hex(openssl_random_pseudo_bytes(32));
}
public function addDestEmail(string $email): self
public function addCcUser(User $user): self
{
if (!in_array($email, $this->destEmail, true)) {
$this->destEmail[] = $email;
if (!$this->ccUser->contains($user)) {
$this->ccUser[] = $user;
}
return $this;
}
public function addCcUser(User $user): self
public function addDestEmail(string $email): self
{
if (!$this->ccUser->contains($user)) {
$this->ccUser[] = $user;
if (!in_array($email, $this->destEmail, true)) {
$this->destEmail[] = $email;
}
return $this;

View File

@ -160,7 +160,7 @@ class WorkflowStepType extends AbstractType
'label' => 'workflow.cc for next steps',
'multiple' => true,
'mapped' => false,
'required' => false
'required' => false,
])
->add('future_dest_emails', ChillCollectionType::class, [
'label' => 'workflow.dest by email',

View File

@ -2,6 +2,13 @@
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\Migrations\Main;
use Doctrine\DBAL\Schema\Schema;