Files
mautic-marketing-program-bu…/Entity/TaskStatus.php
T
2026-11-07 19:31:49 +01:00

35 lines
803 B
PHP

<?php
declare(strict_types=1);
namespace MauticPlugin\PlanBundle\Entity;
/**
* Task status. The order of the cases is the order of the dropdown on the task form.
*/
enum TaskStatus: string
{
case New = 'new';
case Todo = 'todo';
case InProgress = 'in_progress';
case Done = 'done';
public function getLabelKey(): string
{
return 'mautic.plan.task.status.'.$this->value;
}
/**
* Bootstrap label class for the status badge in lists.
*/
public function getLabelClass(): string
{
return match ($this) {
self::New => 'label-default',
self::Todo => 'label-info',
self::InProgress => 'label-warning',
self::Done => 'label-success',
};
}
}