In #1541792: Enable dynamic allowed list values function with additional context we are changing the arguments passed to an allowed values function, and I realized there isn't any documentation for them.

list_test_allowed_values_callback() is the only example in core, and its docblock just says "Allowed values callback."

This is part of the Field API, but only applies to List field types that have allowed values.

One possibility is to document any custom settings in hook_field_info. This might be superseded by the OO Field API.


joachim’s picture

New standards for documenting callbacks apply here: