You are here

public function WorkflowDefaultWidget::submit in Workflow 7.2

Same name and namespace in other branches
  1. 7 includes/Field/WorkflowDefaultWidget.php \WorkflowDefaultWidget::submit()

Implements workflow_transition() -> WorkflowDefaultWidget::submit().

Overrides submit(array $form, array &$form_state). Contains 2 extra parameters for D7

_state

@todo: remove update of {node_form} table. (separate task, because it has features, too)

Parameters

array $form:

array $items: The value of the field.

bool $force: TRUE if all access must be overridden, e.g., for Rules.

Return value

int If update succeeded, the new State Id. Else, the old Id is returned.

This is called from function _workflowfield_form_submit($form, &$form_state) It is a replacement of function workflow_transition($node, $new_sid, $force, $field) It performs the following actions;

  • save a scheduled action
  • update history
  • restore the normal $items for the field.

File

includes/Field/WorkflowDefaultWidget.php, line 93
Contains workflow\includes\Field\WorkflowDefaultWidget.

Class

WorkflowDefaultWidget
Plugin implementation of the 'workflow_default' widget.

Code

public function submit(array $form, array &$form_state, array &$items, $force = FALSE) {
  return workflow_transition_form_submit($form, $form_state);
}