public function MaestroWebformTask::prepareTaskForSave in Maestro 8.2
Same name and namespace in other branches
- 3.x modules/maestro_webform/src/Plugin/EngineTasks/MaestroWebformTask.php \Drupal\maestro_webform\Plugin\EngineTasks\MaestroWebformTask::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
- modules/
maestro_webform/ src/ Plugin/ EngineTasks/ MaestroWebformTask.php, line 433
Class
- MaestroWebformTask
- Maestro Webform Task Plugin.
Namespace
Drupal\maestro_webform\Plugin\EngineTasksCode
public function prepareTaskForSave(array &$form, FormStateInterface $form_state, array &$task) {
$task['data']['unique_id'] = $form_state
->getValue('unique_id');
$task['data']['webform_machine_name'] = $form_state
->getValue('webform_machine_name');
// Forcing this task to not be modal.
$task['data']['modal'] = 'notmodal';
$task['data']['skip_webform_handlers'] = $form_state
->getValue('skip_webform_handlers');
$task['data']['webform_nodes_attached_to'] = $form_state
->getValue('webform_nodes_attached_to');
$task['data']['use_nodes_attached'] = $form_state
->getValue('use_nodes_attached');
$task['data']['webform_nodes_attached_variable'] = $form_state
->getValue('webform_nodes_attached_variable');
$task['data']['redirect_to'] = $form_state
->getValue('redirect_to');
$task['data']['show_edit_form'] = $form_state
->getValue('show_edit_form');
}