You are here

function drupalgap_staticmap_services_request_postprocess_alter in DrupalGap 7

Implements hook_services_request_postprocess_alter().

File

modules/drupalgap_staticmap/drupalgap_staticmap.module, line 6

Code

function drupalgap_staticmap_services_request_postprocess_alter($controller, $args, &$result) {
  switch ($controller['callback']) {
    case '_system_resource_connect':
      ctools_include('export');
      $presets = ctools_export_crud_load_all('staticmap_presets');
      $_presets = array();
      foreach ($presets as $name => $preset) {
        $_presets[$name] = unserialize($preset->data);
      }
      $result->staticmap = array(
        'presets' => $_presets,
      );
      break;
  }
}