- Correct getChoices() docblock to reflect translated label => enum backing value order instead of value => label - Re-indent Smart Links menu config to match actual array nesting - Align assignment operators in RefreshStatsCommand - Add missing newline at end of RefreshStatsCommand.php
35 lines
930 B
PHP
35 lines
930 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace MauticPlugin\MT3SMarketingProgramBundle\Entity;
|
|
|
|
enum ProgramStatus: string
|
|
{
|
|
case Draft = 'draft';
|
|
case Planned = 'planned';
|
|
case Active = 'active';
|
|
case Paused = 'paused';
|
|
case Completed = 'completed';
|
|
case Archived = 'archived';
|
|
|
|
public function getLabelKey(): string
|
|
{
|
|
return 'mt3s.marketing_program.status.'.$this->value;
|
|
}
|
|
|
|
/**
|
|
* The Bootstrap class of the status label in the tables (the program's Status column).
|
|
*/
|
|
public function getLabelClass(): string
|
|
{
|
|
return match ($this) {
|
|
self::Active => 'label-success',
|
|
self::Completed => 'label-info',
|
|
self::Paused => 'label-warning',
|
|
self::Archived => 'label-default',
|
|
self::Draft, self::Planned => 'label-primary',
|
|
};
|
|
}
|
|
}
|