Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
UserContactMappingEvent
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getUserContactMapping
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setUserContactMapping
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3namespace Drupal\crm\Event;
4
5use Drupal\Component\EventDispatcher\Event;
6use Drupal\crm\Entity\UserContactMappingInterface;
7
8/**
9 * Event that is fired when a user is created, and auto create is enabled.
10 */
11class UserContactMappingEvent extends Event {
12
13  /**
14   * The event name.
15   *
16   * @var string
17   */
18  const EVENT_NAME = 'user_contact_mapping_event';
19
20
21  /**
22   * The crm user contact mapping.
23   *
24   * @var \Drupal\crm\Entity\UserContactMappingInterface
25   */
26  protected $userContactMapping;
27
28  /**
29   * Constructs a new UserContactMappingEvent.
30   *
31   * @param \Drupal\crm\Entity\UserContactMappingInterface $user_contact_mapping
32   *   The user contact mapping.
33   */
34  public function __construct(UserContactMappingInterface $user_contact_mapping) {
35    $this->userContactMapping = $user_contact_mapping;
36  }
37
38  /**
39   * Get the crm user contact mapping.
40   *
41   * @return \Drupal\crm\Entity\UserContactMappingInterface
42   *   The crm user contact mapping.
43   */
44  public function getUserContactMapping(): UserContactMappingInterface {
45    return $this->userContactMapping;
46  }
47
48  /**
49   * Set the crm user contact mapping.
50   *
51   * @param \Drupal\crm\Entity\UserContactMappingInterface $user_contact_mapping
52   *   The crm user contact mapping.
53   */
54  public function setUserContactMapping(UserContactMappingInterface $user_contact_mapping): void {
55    $this->userContactMapping = $user_contact_mapping;
56  }
57
58}