Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / contact / contact.post_update.php
1 <?php
2
3 /**
4  * @file
5  * Post update functions for Contact.
6  */
7
8 use Drupal\contact\Entity\ContactForm;
9
10
11 /**
12  * Initialize 'message' and 'redirect' field values to 'contact_form' entities.
13  */
14 function contact_post_update_add_message_redirect_field_to_contact_form() {
15   /** @var \Drupal\contact\ContactFormInterface $contact */
16   foreach (ContactForm::loadMultiple() as $contact) {
17     $contact
18       ->setMessage('Your message has been sent.')
19       ->setRedirectPath('')
20       ->save();
21   }
22 }