Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
hook_controller_settings_alter() is passed an empty array, which isn't very useful for anyone implementing it. An array containing information about the endpoint, resource, and operation being altered would be useful.
Comment | File | Size | Author |
---|---|---|---|
#1 | services-controller_alter-2241051-1.patch | 2.64 KB | grasmash |
Comments
Comment #1
grasmash CreditAttribution: grasmash commentedComment #2
ygerasimov CreditAttribution: ygerasimov commentedPatch has some code not related to drupal_alter(). Please remove it.
Comment #3
grasmash CreditAttribution: grasmash commentedAll of the code in this patch is required in order to accomplish the following:
The code related to the $disabled variable is relevant to point #2. Currently, services only allows the $controller_settings to be altered in if multiple resource_api_version's are offered. If only one version exists, it is impossible to modify the controller. The changes in the patch change this such that ANY change to the $controller_settings will be reflected in the controller. Without this change, the drupal_alter() call is limited to a very narrow use case.
The Services Documentation 7.x-1.x-dev version is currently relying on this patch. It enables the module tot provide a UI for specifying documentation for each resource.
Comment #4
kylebrowning CreditAttribution: kylebrowning commented