registerEnum()
Overview
public void function registerEnum(
required string enum
, required array keys
, struct translations
)
Registers (or replaces) an enum and optional per-property i18n URI templates. Templates may include {key} and {enum} placeholders. When a property has no template, translations fall back to enum.{enum}:{key}.{property}.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| enum | string | Yes | ID of the enum to register |
| keys | array | Yes | Array of enum item keys, in display order |
| translations | struct | No | Struct of property name to URI template, e.g. `{ label="preside-objects.{key}:title" }` |