You are here

function boxes_form_submit_build_box in Boxes 7.2

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

This is the default builder function for the box 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

boxes_form()

node_form_submit_build_node()

1 call to boxes_form_submit_build_box()
boxes_form_submit in includes/boxes.pages.inc
Submit function for box form

File

includes/boxes.pages.inc, line 323
Box Functions

Code

function boxes_form_submit_build_box($form, &$form_state) {

  // @todo Legacy support for modules that extend the box form with form-level
  //   submit handlers that adjust $form_state['values'] prior to those values
  //   being used to update the entity. Module authors are encouraged to instead
  //   adjust the box directly within a hook_boxes_submit() implementation. For
  //   Drupal 8, evaluate whether the pattern of triggering form-level submit
  //   handlers during button-level submit processing is worth supporting
  //   properly, and if so, add a Form API function for doing so.
  unset($form_state['submit_handlers']);
  form_execute_handlers('submit', $form, $form_state);
  $box = $form_state['box'];
  entity_form_submit_build_entity('box', $box, $form, $form_state);
  foreach (module_implements('boxes_submit') as $module) {
    $function = $module . '_boxes_submit';
    $function($box, $form, $form_state);
  }
  return $box;
}