http://api.drupal.org/api/function/theme_fieldset/7

It looks to me like it also uses the "id" property.

CommentFileSizeAuthor
#8 523034b.patch890 bytesjhodgdon
#2 523034.patch779 bytesjhodgdon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: Correction/Clarification » documentation

Please file API doc issues under Project "Drupal", component "documentation". Project "Documentation" is only for handbook docs on drupal.org, not for API issues displayed on api.drupal.org (which are in the code). Thanks!

That aside, another issue with the documentation is that the components should all have # before them: #attributes, #id, etc.

jhodgdon’s picture

FileSize
779 bytes

Here is a patch. It brings the function header doc into compliance with current Doxygen standards (3rd person summary, 80 character lines), adds # before the attributes, and adds the #id attribute to the list.

jhodgdon’s picture

Status: Active » Needs review
NancyDru’s picture

Status: Needs review » Needs work

Formats a group of form items -- it can nicely be used anywhere a collapsible fieldset is desired - not just in forms.

  $data .= _weblinks_links($term);
  foreach ($term->children as $child) {
    $data .= _weblinks_format_group($tree[$child], $tree);
  }
  $fieldset = array(
    '#title' => $term->title,
    '#collapsible' => $term->collapsible,
    '#collapsed' => $term->collapsed,
    '#value' => $data,
    );
  return '<div class="weblinkCat weblinkCat-depth-'. $term->depth .'">'. theme('fieldset', $fieldset) ."</div>\n";
jhodgdon’s picture

True that a fieldset can be used for other things, though it is part of the Form API, so it's probably mostly used in forms and similar pages.

So do you have a suggestion of a better one-line description (80 characters or less) of the function besides the existing "Format(s) a group of form items"? I had just left it as it was (aside from changing the verb tense). I can't think of another concise way of describing what a fieldset is, off-hand.

NancyDru’s picture

How about, "Formats a set of information, such as a group of form items."

Why does it have to be one line?

jhodgdon’s picture

The first line of any doc header needs to be a one-line, 80-character summary of what the function does. It is supposed to be short, because it is used in lists of functions, such as those on this page
http://api.drupal.org/api/file/includes/form.inc/7

So we have made the standard that it should be one 80-character line.

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
890 bytes

How about this patch?

NancyDru’s picture

Status: Needs review » Reviewed & tested by the community

works for me

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.