function MessageForm::submitForm
Same name in other branches
- 11.x core/modules/migrate/src/Form/MessageForm.php \Drupal\migrate\Form\MessageForm::submitForm()
Overrides FormInterface::submitForm
File
-
core/
modules/ migrate/ src/ Form/ MessageForm.php, line 82
Class
- MessageForm
- Migrate messages form.
Namespace
Drupal\migrate\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$filters['message'] = [
'title' => $this->t('message'),
'where' => 'msg.message LIKE ?',
'type' => 'string',
];
$filters['severity'] = [
'title' => $this->t('Severity'),
'where' => 'msg.level = ?',
'type' => 'array',
];
$session_filters = $this->getRequest()
->getSession()
->get('migration_messages_overview_filter', []);
foreach ($filters as $name => $filter) {
if ($form_state->hasValue($name)) {
$session_filters[$name] = [
'where' => $filter['where'],
'value' => $form_state->getValue($name),
'type' => $filter['type'],
];
}
}
$this->getRequest()
->getSession()
->set('migration_messages_overview_filter', $session_filters);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.