function ContactSitewideTest::updateContactForm
Same name in other branches
- 9 core/modules/contact/tests/src/Functional/ContactSitewideTest.php \Drupal\Tests\contact\Functional\ContactSitewideTest::updateContactForm()
- 8.9.x core/modules/contact/tests/src/Functional/ContactSitewideTest.php \Drupal\Tests\contact\Functional\ContactSitewideTest::updateContactForm()
- 11.x core/modules/contact/tests/src/Functional/ContactSitewideTest.php \Drupal\Tests\contact\Functional\ContactSitewideTest::updateContactForm()
Updates a form.
Parameters
string $id: The form machine name.
string $label: The form label.
string $recipients: The list of recipient email addresses.
string $reply: The auto-reply text that is sent to a user upon completing the contact form.
bool $selected: A Boolean indicating whether the form should be selected by default.
string $message: The message that will be displayed to a user upon completing the contact form.
string $redirect: The path where user will be redirect after this form has been submitted..
1 call to ContactSitewideTest::updateContactForm()
- ContactSitewideTest::testSiteWideContact in core/
modules/ contact/ tests/ src/ Functional/ ContactSitewideTest.php - Tests configuration options and the site-wide contact form.
File
-
core/
modules/ contact/ tests/ src/ Functional/ ContactSitewideTest.php, line 561
Class
- ContactSitewideTest
- Tests site-wide contact form functionality.
Namespace
Drupal\Tests\contact\FunctionalCode
public function updateContactForm($id, $label, $recipients, $reply, $selected, $message = 'Your message has been sent.', $redirect = '/') {
$edit = [];
$edit['label'] = $label;
$edit['recipients'] = $recipients;
$edit['reply'] = $reply;
$edit['selected'] = $selected ? TRUE : FALSE;
$edit['message'] = $message;
$edit['redirect'] = $redirect;
$this->drupalGet("admin/structure/contact/manage/{$id}");
$this->submitForm($edit, 'Save');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.