Class Label
Label attribute for enum cases.
This attribute can be used to specify a custom label for an enum case.
If the EnumLabelTrait is used, the label() method will return the label
defined in this attribute instead of a humanized version of the case name.
Namespace: Cake\Database\Type\Attribute
Method Summary
-
__construct() public
Constructor.
Method Detail
__construct() ΒΆ public
__construct(string $label, string $domain = 'default', string $context = '')
Constructor.
Parameters
-
string$label The label to use for the enum case.
-
string$domain optional The translation domain for the label.
-
string$context optional The translation context for the label.