diff --git a/restws.api.php b/restws.api.php index 9e7e976..1882711 100644 --- a/restws.api.php +++ b/restws.api.php @@ -148,6 +148,16 @@ function hook_restws_response_alter(&$response, $function, $formatName) { } /** + * Alter the list of allowed meta controls. + * + * @param array $controls + * A list of allowed meta controlers + */ +function hook_restws_meta_controls_alter(&$controls) { + $controls['deep-load-refs'] = 'deep-load-refs'; +} + +/** * @} */ diff --git a/restws.module b/restws.module index acfaa6a..3efdd60 100644 --- a/restws.module +++ b/restws.module @@ -444,13 +444,15 @@ function restws_module_implements_alter(&$implementations, $hook) { * Return all available meta controls. */ function restws_meta_controls() { - return array( + $controls = array( 'sort' => 'sort', 'direction' => 'direction', 'page' => 'page', 'limit' => 'limit', 'full' => 'full', ); + drupal_alter('restws_meta_controls', $controls); + return $controls; } /**