function gdpr_dump_settings_form_submit in General Data Protection Regulation 7
Gdpr dump settings form submit callback.
File
- modules/
gdpr_dump/ gdpr_dump.module, line 179 - Module file for the GDPR Sql-Dump module.
Code
function gdpr_dump_settings_form_submit($form, &$form_state) {
$tables = $form_state['values']['tables'];
$config = [];
$empty_tables = [];
foreach ($tables as $table => $row) {
if ($row['empty_table'] === 1) {
$empty_tables[$table] = 1;
}
foreach ($row['columns'] as $column_name => $data) {
if ($data['option'] !== 'none') {
$config[$table][$column_name] = $data['option'];
}
}
}
variable_set('gdpr_dump_empty_tables', $empty_tables);
variable_set('gdpr_dump_table_map', $config);
}