function comment_form_submit_build_comment

comment_form_submit_build_comment($form, &$form_state)

Updates the form state's comment entity by processing this submission's values.

This is the default builder function for the comment form. It is called during the "Save" and "Preview" submit handlers to retrieve the entity to save or preview. This function can also be called by a "Next" button of a wizard to update the form state's entity with the current step's values before proceeding to the next step.

See also

comment_form()

File

modules/comment/comment.module, line 2229
Enables users to comment on published content.

Code

function comment_form_submit_build_comment($form, &$form_state) {
  $comment = $form_state['comment'];
  entity_form_submit_build_entity('comment', $comment, $form, $form_state);
  comment_submit($comment);
  return $comment;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!comment!comment.module/function/comment_form_submit_build_comment/7.x