EventBase::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
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