Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
30
core/modules/contact/contact.post_update.php
Normal file
30
core/modules/contact/contact.post_update.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Post update functions for Contact.
|
||||
*/
|
||||
|
||||
use Drupal\contact\Entity\ContactForm;
|
||||
|
||||
/**
|
||||
* @addtogroup updates-8.1.x-to-8.2.x
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Initialize 'message' and 'redirect' field values to 'contact_form' entities.
|
||||
*/
|
||||
function contact_post_update_add_message_redirect_field_to_contact_form() {
|
||||
/** @var \Drupal\contact\ContactFormInterface $contact */
|
||||
foreach (ContactForm::loadMultiple() as $contact) {
|
||||
$contact
|
||||
->setMessage('Your message has been sent.')
|
||||
->setRedirectPath('')
|
||||
->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @} End of "addtogroup updates-8.1.x-to-8.2.x".
|
||||
*/
|
||||
Reference in a new issue