Security update for permissions_by_term
[yaffs-website] / web / modules / contrib / permissions_by_term / modules / permissions_by_entity / src / Event / EntityFieldValueAccessDeniedEvent.php
1 <?php
2
3 namespace Drupal\permissions_by_entity\Event;
4
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Field\FieldItemListInterface;
7 use Symfony\Component\EventDispatcher\Event;
8
9 /**
10  * Class EntityFieldValueAccessDeniedEvent.
11  *
12  * @package Drupal\permissions_by_entity\Event
13  */
14 class EntityFieldValueAccessDeniedEvent extends Event {
15
16   /**
17    * The field that contains the content entity.
18    *
19    * @var \Drupal\Core\Field\FieldItemListInterface
20    */
21   private $field;
22
23   /**
24    * The content entity.
25    *
26    * @var \Drupal\Core\Entity\ContentEntityInterface
27    */
28   private $entity;
29
30   /**
31    * The user id.
32    *
33    * @var int
34    */
35   private $uid;
36
37   /**
38    * The current index.
39    *
40    * @var int
41    */
42   private $index;
43
44   /**
45    * Sets the field.
46    *
47    * @param \Drupal\Core\Field\FieldItemListInterface $field
48    *   The field that contains the content entity.
49    */
50   public function setField(FieldItemListInterface $field) {
51     $this->field = $field;
52   }
53
54   /**
55    * Returns the field.
56    *
57    * @return \Drupal\Core\Field\FieldItemListInterface
58    *   The field that contains the content entity.
59    */
60   public function getField() {
61     return $this->field;
62   }
63
64   /**
65    * Sets the content entity.
66    *
67    * @param \Drupal\Core\Entity\ContentEntityInterface $entity
68    *   The content entity.
69    */
70   public function setEntity(ContentEntityInterface $entity) {
71     $this->entity = $entity;
72   }
73
74   /**
75    * Returns the entity.
76    *
77    * @return \Drupal\Core\Entity\ContentEntityInterface
78    *   The content entity.
79    */
80   public function getEntity() {
81     return $this->entity;
82   }
83
84   /**
85    * Sets the uid.
86    *
87    * @param int $uid
88    *   The user id.
89    */
90   public function setUid($uid) {
91     $this->uid = $uid;
92   }
93
94   /**
95    * Returns the uid.
96    *
97    * @return int
98    *   The user id.
99    */
100   public function getUid() {
101     return $this->uid;
102   }
103
104   /**
105    * Sets the index.
106    *
107    * @param int $index
108    *   The current index.
109    */
110   public function setIndex($index) {
111     $this->index = $index;
112   }
113
114   /**
115    * Returns index.
116    *
117    * @return int
118    *   The current index.
119    */
120   public function getIndex() {
121     return $this->index;
122   }
123 }