function contact_entity_type_alter

Same name in other branches
  1. 8.9.x core/modules/contact/contact.module \contact_entity_type_alter()
  2. 10 core/modules/contact/contact.module \contact_entity_type_alter()
  3. 11.x core/modules/contact/contact.module \contact_entity_type_alter()

Implements hook_entity_type_alter().

File

core/modules/contact/contact.module, line 46

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');
}

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