function filefield_paths_form_submit in File (Field) Paths 8
Same name and namespace in other branches
- 5 filefield_paths.module \filefield_paths_form_submit()
- 6 filefield_paths.module \filefield_paths_form_submit()
- 7 filefield_paths.module \filefield_paths_form_submit()
Submit callback for File (Field) Paths settings form.
Parameters
array $form: TODO.
FormStateInterface $form_state: TODO.
1 string reference to 'filefield_paths_form_submit'
File
- ./
filefield_paths.module, line 232 - Contains core functions for the File (Field) Paths module.
Code
function filefield_paths_form_submit($form, FormStateInterface $form_state) {
$settings = $form_state
->getValue('third_party_settings')['filefield_paths'];
// Retroactive updates.
if ($settings['enabled'] && $settings['retroactive_update']) {
if (filefield_paths_batch_update($form_state
->getFormObject()
->getEntity())) {
$response = batch_process($form_state
->getRedirect());
if ($response instanceof Response) {
$response
->send();
}
}
}
}