You are here

function _workflow_use_action_buttons in Workflow 7.2

Same name and namespace in other branches
  1. 8 workflow.form.inc \_workflow_use_action_buttons()

Getter/Setter to tell if the action buttons are used.

Used to save some expensive operations on every form.

Parameters

bool $new_value: Options. If TRUE/FALSE, the value is set. If NULL, value is only 'getted'.

Return value

bool Previous value. If TRUE, action buttons must be created.

See also

workflow_form_alter()

WorkflowDefaultWidget::formElement()

2 calls to _workflow_use_action_buttons()
WorkflowTransitionForm::buildForm in includes/Form/WorkflowTransitionForm.php
_state
workflow_form_alter in ./workflow.form.inc
Form builder. Move action buttons next to the 'Save'/'Delete' buttons.

File

./workflow.form.inc, line 21
Contains helper functions for WorkflowTransitionForm.

Code

function _workflow_use_action_buttons($new_value = NULL) {
  global $_workflow_use_actions_buttons;
  $old_value = $_workflow_use_actions_buttons ? TRUE : FALSE;

  // Reset value if requested.
  if ($new_value !== NULL) {
    $_workflow_use_actions_buttons = $new_value;
  }
  return $old_value;
}