drupal-7.contact.database.php in Drupal 9
File
core/modules/contact/tests/drupal-7.contact.database.php
View source
<?php
$connection = \Drupal::database();
$connection
->update('contact')
->fields([
'selected' => '0',
])
->condition('cid', '1')
->execute();
$connection
->insert('contact')
->fields([
'category',
'recipients',
'reply',
'weight',
'selected',
])
->values([
'category' => 'Upgrade test',
'recipients' => 'test1@example.com,test2@example.com',
'reply' => 'Test reply',
'weight' => 1,
'selected' => 1,
])
->execute();