Standards for documenting implementations of theme functions

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
rstamm's picture

We don't have a standard doc header for implementations of themeable functions like THEME_process_HOOK and theme_breadcrumb.

my suggestion:

/**
* Implements THEME_process_HOOK().
*/
function garland_process_page(&$variables) {
  //...

/**
* Implements theme_breadcrumb().
*/
function garland_breadcrumb($variables) {
  //...

or

/**
* Overrides theme_breadcrumb().
*/
function garland_breadcrumb($variables) {
  //...

and simular to hook implementations, it is rather standard and does not require more explanation.

Comments

Yes we do.

jhodgdon's picture

We do have a standard, actually:

http://drupal.org/node/1354#themeable

no info on documenting overriding functions

pieter_duijves's picture

hi jhodgdon,

the link you gave helps in learning how to document a theme function (eg: theme_breadcrumb()), but i think it does explain how to comment an OVERRIDING function (eg: garland_breadcrumb()).

maybe i need to search better... cheers! Pieter

True!

jhodgdon's picture

I think your suggestion of a one-liner saying "Overrides theme_whatever()" is a good one.

For hook implementations, you can follow this standard:
http://drupal.org/node/1354#hookimpl

Coding standards

Group organizers

Group categories

Status

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: