function openlayers_example_ctools_plugin_api in Openlayers 7.2
Same name and namespace in other branches
- 6.2 docs/openlayers.api.php \openlayers_example_ctools_plugin_api()
CTools Registration Hook
IMPORTANT:
In order to support styles, maps, and layers in an external module, one must notify the CTools module that that module provides implementations of the hooks for styles, maps, and/or layers.
This function is just an example implementation of hook_ctools_plugin_api() and should be alter according to your module's name.
Parameters
$module: Name of a module that supports CTools exportables.
$api: Name of the kind of exportable supported.
Return value
If $module is 'openlayers', and $api is a type of exportable that your module provides, and you are using Openlayers 2.x, then return array with the following values:
- version => 1
File
- docs/
openlayers.api.php, line 97 - Hooks provided by the OpenLayers suite of modules. This file allows hooks to be documented automatically with Doxygen, like on api.drupal.org.
Code
function openlayers_example_ctools_plugin_api($module, $api) {
if ($module == "openlayers") {
switch ($api) {
case 'openlayers_maps':
return array(
'version' => 1,
);
case 'openlayers_layers':
return array(
'version' => 1,
);
case 'openlayers_styles':
return array(
'version' => 1,
);
}
}
}