You are here

function flag_flag::theme in Flag 5

Same name and namespace in other branches
  1. 6.2 flag.inc \flag_flag::theme()
  2. 6 flag.inc \flag_flag::theme()
  3. 7.3 includes/flag/flag_flag.inc \flag_flag::theme()
  4. 7.2 flag.inc \flag_flag::theme()

Renders a flag/unflag link. This is a wrapper around theme('flag') that, in Drupal 6, easily channels the call to the right template file.

For parameters docmentation, see theme_flag().

File

./flag.inc, line 776
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

flag_flag
This abstract class represents a flag, or, in Views 2 terminology, "a handler".

Code

function theme($action, $content_id, $after_flagging = FALSE) {
  if (!_flag_is_drupal_5()) {

    // We're running Drupal 6.
    return theme($this
      ->theme_suggestions(), $this, $action, $content_id, $after_flagging);
  }
  else {

    // We're running Drupal 5. Noting to do: The theme_suggestions[] are
    // handed to phptemplate in phptemplate_flag(), if the user bothered to
    // copy that function into her 'template.php'.
    return theme('flag', $this, $action, $content_id, $after_flagging);
  }
}