EventBase   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 50
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getBrowserID() 0 3 1
A getBrowserInstanceUUID() 0 3 1
1
<?php
2
3
namespace Drupal\entity_browser\Events;
4
5
use Symfony\Component\EventDispatcher\Event;
6
7
/**
8
 * Base implementation of entity browser events.
9
 */
10
class EventBase extends Event {
11
12
  /**
13
   * Entity browser id.
14
   *
15
   * @var string
16
   */
17
  protected $entityBrowserID;
18
19
  /**
20
   * Entity browser instance UUID.
21
   *
22
   * @var string
23
   */
24
  protected $instanceUUID;
25
26
  /**
27
   * Constructs a EntitySelectionEvent object.
28
   *
29
   * @param string $entity_browser_id
30
   *   Entity browser ID.
31
   * @param string $instance_uuid
32
   *   Entity browser instance UUID.
33
   */
34
  public function __construct($entity_browser_id, $instance_uuid) {
35
    $this->entityBrowserID = $entity_browser_id;
36
    $this->instanceUUID = $instance_uuid;
37
  }
38
39
  /**
40
   * Gets the entity browser ID:.
41
   *
42
   * @return string
43
   *   Entity browser ID.
44
   */
45
  public function getBrowserID() {
46
    return $this->entityBrowserID;
47
  }
48
49
  /**
50
   * Gets the entity browser instance UUID:.
51
   *
52
   * @return string
53
   *   Entity browser instance UUID.
54
   */
55
  public function getBrowserInstanceUUID() {
56
    return $this->instanceUUID;
57
  }
58
59
}
60