contact_form_user_form_alter

contact_form_user_form_alter(&$form, FormStateInterface $form_state) Implements hook_form_FORM_ID_alter(). Add the enable personal contact form to an individual user's account page. See also \Drupal\user\ProfileForm::form() File core/modules/contact/contact.module, line 169 Enables the use of personal and site-wide contact forms. Code function contact_form_user_form_alter(&$form, FormStateInterface $form_state) { $form['contact'] = array( '#type' => 'details', '#title' =

contact_form_user_admin_settings_submit

contact_form_user_admin_settings_submit($form, FormStateInterface $form_state) Form submission handler for user_admin_settings(). See also contact_form_user_admin_settings_alter() File core/modules/contact/contact.module, line 228 Enables the use of personal and site-wide contact forms. Code function contact_form_user_admin_settings_submit($form, FormStateInterface $form_state) { \Drupal::configFactory()->getEditable('contact.settings') ->set('user_default_enabled', $form_state-&

contact_form_user_admin_settings_alter

contact_form_user_admin_settings_alter(&$form, FormStateInterface $form_state) Implements hook_form_FORM_ID_alter(). Add the default personal contact setting on the user settings page. See also \Drupal\user\AccountSettingsForm File core/modules/contact/contact.module, line 206 Enables the use of personal and site-wide contact forms. Code function contact_form_user_admin_settings_alter(&$form, FormStateInterface $form_state) { $form['contact'] = array( '#type' => 'details',

contact_entity_type_alter

contact_entity_type_alter(array &$entity_types) Implements hook_entity_type_alter(). File core/modules/contact/contact.module, line 44 Enables the use of personal and site-wide contact forms. Code function contact_entity_type_alter(array &$entity_types) { /** @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */ $entity_types['user']->setLinkTemplate('contact-form', '/user/{user}/contact'); }

contact_entity_extra_field_info

contact_entity_extra_field_info() Implements hook_entity_extra_field_info(). File core/modules/contact/contact.module, line 52 Enables the use of personal and site-wide contact forms. Code function contact_entity_extra_field_info() { $fields = array(); foreach (array_keys(\Drupal::service('entity_type.bundle.info')->getBundleInfo('contact_message')) as $bundle) { $fields['contact_message'][$bundle]['form']['name'] = array( 'label' => t('Sender name'), 'description' =

ContactMessageAccessControlHandler::checkCreateAccess

protected ContactMessageAccessControlHandler::checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) Performs create access checks. This method is supposed to be overwritten by extending classes that do their own custom access checking. Parameters \Drupal\Core\Session\AccountInterface $account: The user for which to check access. array $context: An array of key-value pairs to pass additional context when needed. string|null $entity_bundle: (optional) The bundle of

ContactMessageAccessControlHandler

Defines the access control handler for the message form entity type. Hierarchy class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityAccessControlHandler implements EntityAccessControlHandlerInterfaceclass \Drupal\contact\ContactMessageAccessControlHandler See also \Drupal\contact\Entity\Message. File core/modules/contact/src/ContactMessageAccessControlHandler.php, line 14 Namespace Drupal\contact Members

ContactFormListBuilder::buildRow

public ContactFormListBuilder::buildRow(EntityInterface $entity) Builds a row for an entity in the entity listing. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity for this row of the list. Return value array A render array structure of fields for this entity. Overrides EntityListBuilder::buildRow See also \Drupal\Core\Entity\EntityListBuilder::render() File core/modules/contact/src/ContactFormListBuilder.php, line 28 Class ContactFormListBuilder Defines a class to bui

ContactFormListBuilder::buildHeader

public ContactFormListBuilder::buildHeader() Builds the header row for the entity listing. Return value array A render array structure of header strings. Overrides EntityListBuilder::buildHeader See also \Drupal\Core\Entity\EntityListBuilder::render() File core/modules/contact/src/ContactFormListBuilder.php, line 18 Class ContactFormListBuilder Defines a class to build a listing of contact form entities. Namespace Drupal\contact Code public function buildHeader() { $header['form']

ContactFormListBuilder

Defines a class to build a listing of contact form entities. Hierarchy class \Drupal\Core\Entity\EntityHandlerBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Entity\EntityListBuilder implements EntityHandlerInterface, EntityListBuilderInterfaceclass \Drupal\Core\Config\Entity\ConfigEntityListBuilderclass \Drupal\contact\ContactFormListBuilder See also \Drupal\contact\Entity\ContactForm File core/modules/contact/src/ContactFormListBuilder.php, line 13 N