Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As this module invents hooks for other modules to implement, it should have an api.php file to document them.
Comment | File | Size | Author |
---|---|---|---|
#5 | captcha-missing_api_.php_file_for_hook_documentation-1988950-5.patch | 5.32 KB | nagwani |
Comments
Comment #1
elachlan CreditAttribution: elachlan commentedCould you please provide a link to documentation on how to implement this, or provide a patch?
Comment #2
joachim CreditAttribution: joachim commentedSure, here are some docs pages about this:
- https://drupal.org/coding-standards/docs#functions
- https://drupal.org/node/161085
All core modules have a *.api.php file that you can use as a template.
You can also use Module Builder to generate the scaffold for the api.php file.
Comment #3
nagwani CreditAttribution: nagwani commentedAttaching .api.php. Created from api.txt file. Please review.
Comment #4
joachim CreditAttribution: joachim commentedLooks like a good start! Few things missing and need cleaning up:
You should have only one docblock for each function. The 'Implementation...' one should be removed.
Parameters and return need to be documented.
Comment #5
nagwani CreditAttribution: nagwani commentedUpdated.
Comment #6
nagwani CreditAttribution: nagwani commentedComment #10
mgbellaire CreditAttribution: mgbellaire commentedjoachim, are you saying that the "Implementation..." blocks need to be removed and not replaced by anything else?
Comment #11
mgbellaire CreditAttribution: mgbellaire commentedUpdating shown files...
Comment #12
joachim CreditAttribution: joachim commentedFrom the docs:
So for example:
Comment #13
max-kuzomko CreditAttribution: max-kuzomko at Smartweb commentedComment #16
max-kuzomko CreditAttribution: max-kuzomko at Smartweb commentedComment #17
wundo CreditAttribution: wundo at Chuva Inc. for Chuva Inc. commented