You are here

function pardot_entity_type_alter in Pardot Integration 2.x

Implements hook_entity_type_alter().

See also

Drupal\Core\Entity\EntityTypeInterface[]

File

./pardot.module, line 41
Contains pardot.module.

Code

function pardot_entity_type_alter(array &$entity_types) {
  if (!empty($entity_types['contact_form'])) {
    $entity_types['contact_form']
      ->setLinkTemplate('pardot-form-mapping', "/admin/structure/contact/manage/{contact_form}/pardot-form-settings");
  }
  if (!empty($entity_types['webform'])) {
    $entity_types['webform']
      ->setLinkTemplate('pardot-form-mapping', "/admin/structure/webform/manage/{webform}/pardot-form-settings");
  }
}