public function MaestroNonInteractiveExampleTask::prepareTaskForSave in Maestro 8.2
Same name and namespace in other branches
- 3.x modules/examples/maestro_noninteractive_task_plugin_example/src/Plugin/EngineTasks/MaestroNonInteractiveExampleTask.php \Drupal\maestro_noninteractive_task_plugin_example\Plugin\EngineTasks\MaestroNonInteractiveExampleTask::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/
examples/ maestro_noninteractive_task_plugin_example/ src/ Plugin/ EngineTasks/ MaestroNonInteractiveExampleTask.php, line 155
Class
- MaestroNonInteractiveExampleTask
- Maestro Non Interactive Example Task Plugin.
Namespace
Drupal\maestro_noninteractive_task_plugin_example\Plugin\EngineTasksCode
public function prepareTaskForSave(array &$form, FormStateInterface $form_state, array &$task) {
/*
* Do you need to massage the edited and saved data in for this task before it is saved to the template?
* This is where you do that. Generally you'd place task data into the 'data' property of the template as shown
* in the example here:
*
* $task['handler'] = $form_state->getValue('handler'); //if you have a handler field, this is how you'd populate the task with it
* $task['data']['my_field'] = ...do some work here....;
*
*/
}