You are here

function openlayers_ctools_plugin_directory in Openlayers 6.2

Same name in this branch
  1. 6.2 openlayers.module \openlayers_ctools_plugin_directory()
  2. 6.2 docs/openlayers.api.php \openlayers_ctools_plugin_directory()
Same name and namespace in other branches
  1. 7.2 openlayers.module \openlayers_ctools_plugin_directory()

CTools Registration Hook (Style Plugins)

IMPORTANT:

In order to support style plugins, the first step is to tell CTools where to find the plugin.

This function is just an example implementation of hook_ctools_plugin_directory() and should be alter according to your module's name.

For an example, please see the openlayers_test.module

Parameters

$module: Name of a module that supports CTools exportables.

$plugin: Name of the kind of plugin 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 the directory relative to a module to look for this particular plugin.

File

docs/openlayers.api.php, line 309
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_ctools_plugin_directory($module, $plugin) {
  if ($module == 'openlayers' && $plugin == 'style_plugin') {
    return 'plugins/style_plugin';
  }
}