You are here

function contact_entity_type_alter in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/contact/contact.module \contact_entity_type_alter()
  2. 9 core/modules/contact/contact.module \contact_entity_type_alter()

Implements hook_entity_type_alter().

File

core/modules/contact/contact.module, line 46
Enables the use of personal and site-wide contact forms.

Code

function contact_entity_type_alter(array &$entity_types) {

  /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */
  $entity_types['user']
    ->setLinkTemplate('contact-form', '/user/{user}/contact');
}