18.10.2016 Views

Drupal 7 Module Development

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Creating Your First <strong>Module</strong><br />

Doxygen-style doc blocks<br />

<strong>Drupal</strong> uses Doxygen to extract API documentation from source code. Experienced<br />

PHP coders may recognize this concept, as it is similar to PhpDocumentor comments<br />

(or Java's JavaDoc). However, <strong>Drupal</strong> does have its idiosyncrasies, and does not<br />

follow the same conventions as these systems.<br />

We will only look at the documentation blocks as they apply to our preceding<br />

specific example. As we proceed through the book, we will see more advanced<br />

examples of correct documentation practices.<br />

Let's take a closer look at the first dozen lines of our module:<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!