| Total Complexity | 10 |
| Total Lines | 122 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class FieldEvent extends Event |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private $adminName; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | private $actionName; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $fieldName; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var string|null |
||
| 27 | */ |
||
| 28 | private $type; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var FieldInterface|null |
||
| 32 | */ |
||
| 33 | private $field; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | private $entityClass; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @var array |
||
| 42 | */ |
||
| 43 | private $options = []; |
||
| 44 | |||
| 45 | public function __construct( |
||
| 46 | string $adminName, |
||
| 47 | string $actionName, |
||
| 48 | string $fieldName, |
||
| 49 | string $entityClass, |
||
| 50 | string $type = null, |
||
| 51 | FieldInterface $field = null |
||
| 52 | ) { |
||
| 53 | $this->adminName = $adminName; |
||
| 54 | $this->actionName = $actionName; |
||
| 55 | $this->fieldName = $fieldName; |
||
| 56 | $this->type = $type; |
||
| 57 | $this->field = $field; |
||
| 58 | $this->entityClass = $entityClass; |
||
| 59 | } |
||
| 60 | /** |
||
| 61 | * @param string|null $type |
||
| 62 | */ |
||
| 63 | public function setType(?string $type): void |
||
| 64 | { |
||
| 65 | $this->type = $type; |
||
| 66 | } |
||
| 67 | |||
| 68 | /** |
||
| 69 | * @param array $options |
||
| 70 | */ |
||
| 71 | public function setOptions(array $options): void |
||
| 72 | { |
||
| 73 | $this->options = $options; |
||
| 74 | } |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return string |
||
| 78 | */ |
||
| 79 | public function getAdminName(): string |
||
| 80 | { |
||
| 81 | return $this->adminName; |
||
| 82 | } |
||
| 83 | |||
| 84 | /** |
||
| 85 | * @return string |
||
| 86 | */ |
||
| 87 | public function getActionName(): string |
||
| 88 | { |
||
| 89 | return $this->actionName; |
||
| 90 | } |
||
| 91 | |||
| 92 | /** |
||
| 93 | * @return string |
||
| 94 | */ |
||
| 95 | public function getFieldName(): string |
||
| 96 | { |
||
| 97 | return $this->fieldName; |
||
| 98 | } |
||
| 99 | |||
| 100 | /** |
||
| 101 | * @return string|null |
||
| 102 | */ |
||
| 103 | public function getType(): ?string |
||
| 104 | { |
||
| 105 | return $this->type; |
||
| 106 | } |
||
| 107 | |||
| 108 | /** |
||
| 109 | * @return FieldInterface|null |
||
| 110 | */ |
||
| 111 | public function getField(): ?FieldInterface |
||
| 112 | { |
||
| 113 | return $this->field; |
||
| 114 | } |
||
| 115 | |||
| 116 | /** |
||
| 117 | * @return string |
||
| 118 | */ |
||
| 119 | public function getEntityClass(): string |
||
| 120 | { |
||
| 121 | return $this->entityClass; |
||
| 122 | } |
||
| 123 | |||
| 124 | /** |
||
| 125 | * @return array |
||
| 126 | */ |
||
| 127 | public function getOptions(): array |
||
| 130 | } |
||
| 131 | } |
||
| 132 |