public function MaestroSetProcessVariableTask::prepareTaskForSave in Maestro 8.2
Same name and namespace in other branches
- 3.x src/Plugin/EngineTasks/MaestroSetProcessVariableTask.php \Drupal\maestro\Plugin\EngineTasks\MaestroSetProcessVariableTask::prepareTaskForSave()
The specific task's manipulation of the values to save for a template save.
Parameters
array $form: The form.
\Drupal\Core\Form\FormStateInterface $form_state: The form's form state.
array $task: The fully loaded task array from the template.
Overrides MaestroEngineTaskInterface::prepareTaskForSave
File
- src/
Plugin/ EngineTasks/ MaestroSetProcessVariableTask.php, line 233
Class
- MaestroSetProcessVariableTask
- Maestro Set Process Variable Task Plugin.
Namespace
Drupal\maestro\Plugin\EngineTasksCode
public function prepareTaskForSave(array &$form, FormStateInterface $form_state, array &$task) {
$spv = $form_state
->getValue('spv');
$task['data']['spv'] = [
'variable' => $spv['variable'],
'method' => $spv['method'],
'variable_value' => $spv['variable_value'],
];
}