You are here

function hook_farm_api_meta_alter in farmOS 2.x

Alter the a "meta.farm" data in the root /api endpoint.

Parameters

array &$data: The data to be altered.

1 function implements hook_farm_api_meta_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

quantity_farm_api_meta_alter in modules/core/quantity/quantity.module
Implements hook_farm_api_meta_alter().
1 invocation of hook_farm_api_meta_alter()
FarmEntryPoint::index in modules/core/api/src/Controller/FarmEntryPoint.php
Controller to list all the resources.

File

modules/core/api/farm_api.api.php, line 23
Hooks provided by farm_api.

Code

function hook_farm_api_meta_alter(array &$data) {

  // Add a custom key.
  $data['mykey'] = 'myvalue';
}