mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-01 10:59:45 +00:00
Use enums in flag providers and rename NotificationEnum to NotificationFlagEnum
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Chill\MainBundle\Notification\FlagProviders;
|
||||
|
||||
use Chill\MainBundle\Entity\NotificationFlagEnum;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
use Symfony\Contracts\Translation\TranslatableInterface;
|
||||
|
||||
@@ -10,7 +11,7 @@ class AccompanyingCourseNotificationFlagProvider implements NotificationFlagProv
|
||||
|
||||
public function getFlag(): string
|
||||
{
|
||||
return 'acc-course-notif';
|
||||
return NotificationFlagEnum::ACC_COURSE->value;
|
||||
}
|
||||
|
||||
public function getLabel(): TranslatableInterface
|
||||
|
@@ -2,19 +2,20 @@
|
||||
|
||||
namespace Chill\MainBundle\Notification\FlagProviders;
|
||||
|
||||
use Chill\MainBundle\Entity\NotificationFlagEnum;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
use Symfony\Contracts\Translation\TranslatableInterface;
|
||||
|
||||
class AccompanyingCourseWorkEvalNotificationFlagProvider implements NotificationFlagProviderInterface
|
||||
class AccompanyingCourseWorkEvalDocNotificationFlagProvider implements NotificationFlagProviderInterface
|
||||
{
|
||||
|
||||
public function getFlag(): string
|
||||
{
|
||||
return 'acc-course-work-eval-notif';
|
||||
return NotificationFlagEnum::ACC_COURSE_WORK_EVAL_DOC->value;
|
||||
}
|
||||
|
||||
public function getLabel(): TranslatableInterface
|
||||
{
|
||||
return new TranslatableMessage('notification.flags.acc-course-work-eval');
|
||||
return new TranslatableMessage('notification.flags.acc-course-work-eval-doc');
|
||||
}
|
||||
}
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Chill\MainBundle\Notification\FlagProviders;
|
||||
|
||||
use Chill\MainBundle\Entity\NotificationFlagEnum;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
use Symfony\Contracts\Translation\TranslatableInterface;
|
||||
|
||||
@@ -10,7 +11,7 @@ class AccompanyingCourseWorkNotificationFlagProvider implements NotificationFlag
|
||||
|
||||
public function getFlag(): string
|
||||
{
|
||||
return 'acc-course-work-notif';
|
||||
return NotificationFlagEnum::ACC_COURSE_WORK->value;
|
||||
}
|
||||
|
||||
public function getLabel(): TranslatableInterface
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Chill\MainBundle\Notification\FlagProviders;
|
||||
|
||||
use Chill\MainBundle\Entity\NotificationFlagEnum;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
use Symfony\Contracts\Translation\TranslatableInterface;
|
||||
|
||||
@@ -10,7 +11,7 @@ class ActivityNotificationFlagProvider implements NotificationFlagProviderInterf
|
||||
|
||||
public function getFlag(): string
|
||||
{
|
||||
return 'activity-notif';
|
||||
return NotificationFlagEnum::ACTIVITY->value;
|
||||
}
|
||||
|
||||
public function getLabel(): TranslatableInterface
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Chill\MainBundle\Notification\FlagProviders;
|
||||
|
||||
use Chill\MainBundle\Entity\NotificationFlagEnum;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
use Symfony\Contracts\Translation\TranslatableInterface;
|
||||
|
||||
@@ -10,7 +11,7 @@ class DesignatedReferrerNotificationFlagProvider implements NotificationFlagProv
|
||||
|
||||
public function getFlag(): string
|
||||
{
|
||||
return 'referrer-acc-course-notif';
|
||||
return NotificationFlagEnum::REFERRER_ACC_COURSE->value;
|
||||
}
|
||||
|
||||
public function getLabel(): TranslatableInterface
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Chill\MainBundle\Notification\FlagProviders;
|
||||
|
||||
use Chill\MainBundle\Entity\NotificationFlagEnum;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
use Symfony\Contracts\Translation\TranslatableInterface;
|
||||
|
||||
@@ -10,7 +11,7 @@ class PersonAddressMoveNotificationFlagProvider implements NotificationFlagProvi
|
||||
|
||||
public function getFlag(): string
|
||||
{
|
||||
return 'person-address-move-notif';
|
||||
return NotificationFlagEnum::PERSON_MOVE->value;
|
||||
}
|
||||
|
||||
public function getLabel(): TranslatableInterface
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Chill\MainBundle\Notification\FlagProviders;
|
||||
|
||||
use Chill\MainBundle\Entity\NotificationFlagEnum;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
use Symfony\Contracts\Translation\TranslatableInterface;
|
||||
|
||||
@@ -10,7 +11,7 @@ class WorkflowTransitionNotificationFlagProvider implements NotificationFlagProv
|
||||
|
||||
public function getFlag(): string
|
||||
{
|
||||
return 'workflow-trans-notif';
|
||||
return NotificationFlagEnum::WORKFLOW_TRANS->value;
|
||||
}
|
||||
|
||||
public function getLabel(): TranslatableInterface
|
||||
|
Reference in New Issue
Block a user