Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Sep 2009 at 15:29 UTC
Updated:
15 Oct 2009 at 18:50 UTC
As per http://drupal.org/node/345866 —
Either: http://drupal.org/files/issues/block_example.module_0.patch needs to be applied to block_example.module
or: http://drupal.org/node/345866#comment-1182438 "Add the documentation to block.api.php? Looks like there are already some exciting and amazing examples there."
Then on http://api.drupal.org/api/function/hook_block_info/7 "For a detailed usage example, see block_example.module." needs to change if necessary. Same in doxygen comments to block.api.php.
Comments
Comment #1
willmoy commentedComment #2
jhodgdonComment #3
jhodgdonActually, the block example module at http://api.drupal.org/api/drupal/developer--examples--block_example.modu... has obviously not been updated for Drupal 7. It isn't implementing any of the D7 hooks, and is still implementing D6 hook_block(), which doesn't even exist any more in D7.
Not to mention that the rest of the example modules also need to be updated... there are other issues filed on some of the other ones. Sounds like a good project for someone with a lot of time on their hands, who wants to get up to date on all the new APIs in D7. :)
Comment #4
jhodgdonAnyway, I applied that patch (with a few small modifications). See http://drupal.org/cvs?commit=270062 (in the contrib repository). I think everything is fine now. And I think those example modules are useful to beginning module developers -- better to have a complete module as an example than examples on individual functions, I think.