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.

Comments

joachim’s picture

New standards for documenting callbacks apply here: http://drupal.org/node/1354#callback-def

Version:8.0.x-dev» 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.