Trait EnumLabelTrait
Trait EnumLabelTrait
Provides a method to get the label for an enum case.
Namespace: Cake\Database\Type
Property Summary
-
$name public @property-read
stringThe enum case name.
Method Summary
-
label() public
Returns the label for the enum.
If the enum case has a
Labelattribute, it will return the label defined in the attribute. Otherwise, it will return a humanized version of the enum case name.
Method Detail
label() ¶ public
label(): string
Returns the label for the enum.
If the enum case has a Label attribute, it will return the label defined in the attribute.
Otherwise, it will return a humanized version of the enum case name.
Returns
string