function _workflow_use_action_buttons in Workflow 8
Same name and namespace in other branches
- 7.2 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
string $button_type: Options. If empty, value is only getted, else the button type.
Return value
string Previous value. If 'dropbutton'||'buttons', action buttons must be created.
See also
WorkflowDefaultWidget::formElement()
4 calls to _workflow_use_action_buttons()
- WorkflowTransitionElement::transitionElement in src/
Element/ WorkflowTransitionElement.php - Generate an element.
- WorkflowTransitionForm::actions in src/
Form/ WorkflowTransitionForm.php - Returns an array of supported actions for the current entity form.
- workflow_form_alter in ./
workflow.form.inc - Implements hook_form_alter().
- _workflow_transition_form_get_action_buttons in ./
workflow.form.inc - Returns the action buttons from the options widget.
File
- ./
workflow.form.inc, line 27 - Contains helper functions for WorkflowTransitionForm.
Code
function _workflow_use_action_buttons($button_type = '') {
global $_workflow_use_actions_buttons;
// Reset value if requested.
if ($button_type) {
$_workflow_use_actions_buttons = $button_type;
}
return $_workflow_use_actions_buttons;
}