diff -u b/core/includes/form.inc b/core/includes/form.inc --- b/core/includes/form.inc +++ b/core/includes/form.inc @@ -1600,7 +1600,7 @@ * * Adds a column of radio buttons or checkboxes for each row of a table. * - * @param $element + * @param array $element * An associative array containing the properties and children of * the tableselect element. Properties used: #header, #options, #empty, * and #js_select. The #options property is an array of selection options; @@ -1609,32 +1609,35 @@ * table row's HTML attributes; see theme_table(). An example of per-row * options: * @code - * $options = array( - * array( - * 'title' => 'How to Learn Drupal', - * 'content_type' => 'Article', - * 'status' => 'published', - * '#attributes' => array('class' => array('article-row')), - * ), - * array( - * 'title' => 'Privacy Policy', - * 'content_type' => 'Page', - * 'status' => 'published', - * '#attributes' => array('class' => array('page-row')), - * ), - * ); - * $header = array( - * 'title' => t('Title'), - * 'content_type' => t('Content type'), - * 'status' => t('Status'), - * ); - * $form['table'] = array( - * '#type' => 'tableselect', - * '#header' => $header, - * '#options' => $options, - * '#empty' => t('No content available.'), - * ); + * $options = array( + * array( + * 'title' => 'How to Learn Drupal', + * 'content_type' => 'Article', + * 'status' => 'published', + * '#attributes' => array('class' => array('article-row')), + * ), + * array( + * 'title' => 'Privacy Policy', + * 'content_type' => 'Page', + * 'status' => 'published', + * '#attributes' => array('class' => array('page-row')), + * ), + * ); + * $header = array( + * 'title' => t('Title'), + * 'content_type' => t('Content type'), + * 'status' => t('Status'), + * ); + * $form['table'] = array( + * '#type' => 'tableselect', + * '#header' => $header, + * '#options' => $options, + * '#empty' => t('No content available.'), + * ); * @endcode + * + * @return array + * The processed element. */ function form_pre_render_tableselect($element) { $rows = array(); @@ -1695,11 +1698,11 @@ /** * Creates checkbox or radio elements to populate a tableselect table. * - * @param $element + * @param array $element * An associative array containing the properties and children of the * tableselect element. * - * @return + * @return array * The processed element. */ function form_process_tableselect($element) {