I have an entity, let's say "customer" and this entity has 3 possible status: active, inactive and deleted.
This 3 status handles 3 labels: Active, Inactive and Deleted and they are used in the form, in the detail and maybe in a list so I we have a common array:
array(
'active' => 'Active',
'inactive' => 'Inactive',
'deleted' => 'Deleted
);
What I normally do is to handle this in a method called getAcceptedStatus that returns this values but then I figured out that I had to make something like this:
$acceptedStatus = $customer->getAcceptedStatus();
echo $acceptedStatus[$customer->getStatus()];
And I do not find it good enough. How do you (would you) handle it? Should I create a method that return directly the label?