diff options
Diffstat (limited to 'modules/forum/forum.admin.inc')
-rw-r--r-- | modules/forum/forum.admin.inc | 77 |
1 files changed, 58 insertions, 19 deletions
diff --git a/modules/forum/forum.admin.inc b/modules/forum/forum.admin.inc index 49c71d90a..712cf546e 100644 --- a/modules/forum/forum.admin.inc +++ b/modules/forum/forum.admin.inc @@ -2,7 +2,22 @@ /** * @file - * Administrative page callbacks for the forum module. + * Administrative page callbacks for the Forum module. + */ + +/** + * Page callback: Returns a form for creating a new forum or container. + * + * @param $type + * What is being added. Possible values are 'forum' and 'container'. + * @param $edit + * (optional) Associative array containing a forum term to be edited. + * Defaults to an empty array. + * + * @return + * A form for creating a new forum or container. + * + * @see forum_menu() */ function forum_form_main($type, $edit = array()) { $edit = (array) $edit; @@ -20,11 +35,14 @@ function forum_form_main($type, $edit = array()) { } /** - * Returns a form for adding a forum to the forum vocabulary + * Form constructor for adding and editing a forum. + * + * @param $edit + * (optional) Associative array containing a forum term to be added or edited. + * Defaults to an empty array. * - * @param $edit Associative array containing a forum term to be added or edited. - * @ingroup forms * @see forum_form_submit() + * @ingroup forms */ function forum_form_forum($form, &$form_state, $edit = array()) { $edit += array( @@ -67,7 +85,7 @@ function forum_form_forum($form, &$form_state, $edit = array()) { } /** - * Process forum form and container form submissions. + * Form submission handler for forum_form_forum() and forum_form_container(). */ function forum_form_submit($form, &$form_state) { if ($form['form_id']['#value'] == 'forum_form_container') { @@ -104,8 +122,8 @@ function forum_form_submit($form, &$form_state) { /** * Returns HTML for a forum form. * - * By default this does not alter the appearance of a form at all, - * but is provided as a convenience for themers. + * By default this does not alter the appearance of a form at all, but is + * provided as a convenience for themers. * * @param $variables * An associative array containing: @@ -118,11 +136,14 @@ function theme_forum_form($variables) { } /** - * Returns a form for adding a container to the forum vocabulary + * Form constructor for adding and editing forum containers. + * + * @param $edit + * (optional) Associative array containing a container term to be added or edited. + * Defaults to an empty array. * - * @param $edit Associative array containing a container term to be added or edited. - * @ingroup forms * @see forum_form_submit() + * @ingroup forms */ function forum_form_container($form, &$form_state, $edit = array()) { $edit += array( @@ -176,9 +197,13 @@ function forum_form_container($form, &$form_state, $edit = array()) { } /** - * Returns a confirmation page for deleting a forum taxonomy term. + * Form constructor for confirming deletion of a forum taxonomy term. + * + * @param $tid + * ID of the term to be deleted. * - * @param $tid ID of the term to be deleted + * @see forum_confirm_delete_submit() + * @ingroup forms */ function forum_confirm_delete($form, &$form_state, $tid) { $term = taxonomy_term_load($tid); @@ -190,7 +215,7 @@ function forum_confirm_delete($form, &$form_state, $tid) { } /** - * Implement forms api _submit call. Deletes a forum after confirmation. + * Form submission handler for forum_confirm_delete(). */ function forum_confirm_delete_submit($form, &$form_state) { taxonomy_term_delete($form_state['values']['tid']); @@ -202,9 +227,11 @@ function forum_confirm_delete_submit($form, &$form_state) { } /** - * Form builder for the forum settings page. + * Form constructor for the forum settings page. * + * @see forum_menu() * @see system_settings_form() + * @ingroup forms */ function forum_admin_settings($form) { $number = drupal_map_assoc(array(5, 10, 15, 20, 25, 30, 35, 40, 50, 60, 80, 100, 150, 200, 250, 300, 350, 400, 500)); @@ -232,7 +259,13 @@ function forum_admin_settings($form) { } /** - * Returns an overview list of existing forums and containers + * Form constructor for the forum overview form. + * + * Returns a form for controlling the hierarchy of existing forums and + * containers. + * + * @see forum_menu() + * @ingroup forms */ function forum_overview($form, &$form_state) { module_load_include('inc', 'taxonomy', 'taxonomy.admin'); @@ -267,11 +300,17 @@ function forum_overview($form, &$form_state) { } /** - * Returns a select box for available parent terms + * Returns a select box for available parent terms. + * + * @param $tid + * ID of the term that is being added or edited. + * @param $title + * Title for the select box. + * @param $child_type + * Whether the child is a forum or a container. * - * @param $tid ID of the term which is being added or edited - * @param $title Title to display the select box with - * @param $child_type Whether the child is forum or container + * @return + * A select form element. */ function _forum_parent_select($tid, $title, $child_type) { |