public function AdminContentNotification::submitForm in Admin Content Notification 8.3
Same name and namespace in other branches
- 8 src/Form/AdminContentNotification.php \Drupal\admin_content_notification\Form\AdminContentNotification::submitForm()
- 8.2 src/Form/AdminContentNotification.php \Drupal\admin_content_notification\Form\AdminContentNotification::submitForm()
Add submit handler.
@inheritDoc
Overrides ConfigFormBase::submitForm
File
- src/
Form/ AdminContentNotification.php, line 222
Class
- AdminContentNotification
- Class AdminContentNotification implements settings for admin notification.
Namespace
Drupal\admin_content_notification\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$user_input_values = $form_state
->getUserInput();
$config = $this->configFactory
->getEditable('admin_content_notification.settings');
$config
->set('admin_content_notification_node_types', $user_input_values['admin_content_notification_node_types']);
$config
->set('admin_content_notification_trigger_on_node_update', $user_input_values['admin_content_notification_trigger_on_node_update']);
$config
->set('admin_content_notification_trigger_on_node_status', $user_input_values['admin_content_notification_trigger_on_node_status']);
$config
->set('admin_content_notification_email_limit', $user_input_values['admin_content_notification_email_limit']);
$config
->set('admin_content_notification_allowed_roles', $user_input_values['admin_content_notification_allowed_roles']);
$config
->set('admin_content_notification_email', $user_input_values['admin_content_notification_email']);
$config
->set('admin_content_notification_roles_notified', $user_input_values['admin_content_notification_roles_notified']);
$config
->set('admin_content_notification_email_subject', $user_input_values['admin_content_notification_email_subject']);
$config
->set('admin_content_notification_email_body', $user_input_values['admin_content_notification_email_body']);
$config
->save();
parent::submitForm($form, $form_state);
}