Closed (fixed)
Project:
Openlayers
Version:
6.x-2.0-alpha6
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 May 2010 at 17:31 UTC
Updated:
5 Jun 2010 at 21:40 UTC
The docs are missing to describe how to register the openlayers hooks like hook_openlayers_styles() or hook_openlayers_presets().
Simply adding those hooks to a module won't work until you haven't registered them to ctools using:
hook_ctools_plugin_api($module,$api) {
if($module == 'openlayers') {
switch($api) {
case 'openlayers_styles':
return array('version' => 1);
case 'openlayers_presets':
return array('version' => 1);
}
}
}
Comments
Comment #1
tmcw commentedYou're right, that's a blind spot of the documentation and should be added.
Comment #2
tmcw commentedAdded in http://drupal.org/cvs?commit=370328
Comment #3
zzolo commented@tmcw thanks for doing this. I have updated this a little. We should not be documenting hook_ctools_plugin_api().
I don't think what I did is the best, but for the situation I think it is. Ideally, we could depend on another module to provide the same sort of documentation and saying @see hook_ctools_plugin_api() would work, but we can't. So, what I did was created a openlayers_example_ctools_plugin_api() function to document and used @see to reference that. I also fixed a couple other doc points, including this handbook page:
http://drupal.org/node/620602
http://drupal.org/cvs?commit=370348