Drupal api module

The Drupal api module is very useful. It's also quite strict in the formats it recognises.

If you are having trouble getting it to reconise your doc-comments make sure you are following the Drupal coding standards

drupal.org/coding-standards

In particular function declarations must be like

<?php
function my_function($param) {
?>

Any missing (or extra) spaces will cause the papi parser to ignore the function.

You can also include html files in your documentation (just save them anywhere the api module has been set to index).

The <title> will be used as the "docblock title" and the <body> of the html will be displayed formatted within your site template.
I haven't figured out yet where/if the "docblock title" is displayed

Again the parser is quite strict - you must have an <h1> element in the page.

Everything up untill the end of the first <h1> element is ignored (which seems odd to me) - and the rest as the body of the documentation. 

Tags

Post new comment

Got something to add - just enter a comment
all other fields are optional.

Your email address will not be published.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
15 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.