| Version 1 (modified by peter, 3 years ago) |
|---|
/**
* Returns HTML for a foo.
*
* @param $variables
* An associative array containing:
* - foo: The foo object that is being formatted.
* - show_bar: TRUE to show the bar component, FALSE to omit it.
*
* @ingroup themeable
*/
function theme_foo($variables) {
...
}
In order to provide a quick reference for themers, we tag all themeable functions so that Doxygen can group them together. A themeable function is defined as any function meant to be called via theme(), and you can indicate that a function is themeable by adding an @ingroup themeable directive. It is also beneficial to use @see directives to link the theme function with its preprocessing functions.
In the rare case that your theme function returns some other type of formatted output other than HTML, you should add a @return directive with a description of what the function generates and returns.
