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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grasmash’s picture

Status: Active » Needs review
FileSize
2.64 KB
ygerasimov’s picture

Status: Needs review » Needs work

Patch has some code not related to drupal_alter(). Please remove it.

grasmash’s picture

Status: Needs work » Needs review

All of the code in this patch is required in order to accomplish the following:

  1. Provide contextual information about a given controller to any module implementing the drupal_alter() call
  2. Allow any module implementing drupal_alter() call to actually change controller settings in all circumstances

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.

kylebrowning’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.