Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294542

Narrow the API of hook_options_list() and friends

$
0
0

As part of #1950632: Make formatters and widgets work on nonconfigurable fields, we want to decouple formatters and widgets from $field and $instance config entities to allow reuse for nonconfigurable fields. Which means, we also need to decouple the helper functions that they call from these variables. One such set of functions is hook_options_list() and everything in that pipeline like 'options_list_callback' and 'allowed_values_function' callbacks, which all have the same signatures.

Per the other issue, with respect to formatters/widgets and the functions they rely on, we can and should merge $field['settings'] and $instance['settings'] into a single $settings. That is the only variable from $field and $instance that core implementations of hook_options_list() and friends rely on.

But, what about contrib? What else from $field and $instance does it make sense for hook_options_list() and friends to have access to?


Viewing all articles
Browse latest Browse all 294542


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>