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

NameTypeRequiredDescription
enumstringYesID of the enum to register
keysarrayYesArray of enum item keys, in display order
translationsstructNoStruct of property name to URI template, e.g. `{ label="preside-objects.{key}:title" }`