contact_storage_test.module

Same filename in other branches
  1. 9 core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module
  2. 8.9.x core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module
  3. 10 core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module

File

core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module

View source
<?php


/**
 * @file
 * Contains custom contact message functionality for ContactStorageTest.
 */
declare (strict_types=1);
use Drupal\contact\ContactFormInterface;
use Drupal\Core\Form\FormStateInterface;

/**
 * Entity builder for the contact form edit form with third party options.
 *
 * @see contact_storage_test_form_contact_form_edit_form_alter()
 */
function contact_storage_test_contact_form_form_builder($entity_type, ContactFormInterface $contact_form, &$form, FormStateInterface $form_state) {
    $contact_form->setThirdPartySetting('contact_storage_test', 'send_a_pony', $form_state->getValue('send_a_pony'));
}

Functions

Title Deprecated Summary
contact_storage_test_contact_form_form_builder Entity builder for the contact form edit form with third party options.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.