PluginProbe
The Innovative Form Builder – IvyForms / 1.4
The Innovative Form Builder – IvyForms v1.4
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Entity / GoogleSheets / GoogleSheetIntegration.php

GoogleSheetIntegration.php in The Innovative Form Builder – IvyForms 1.4, at backend/src/Entity/GoogleSheets/GoogleSheetIntegration.php

145 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\Entity\GoogleSheets;
4
5 use DateTime;
6 use IvyForms\ValueObjects\GoogleSheets\GoogleSheetIntegration as GoogleSheetIntegrationValueObject;
7
8 /**
9 * Google Sheet integration entity.
10 */
11 class GoogleSheetIntegration
12 {
13 private GoogleSheetIntegrationValueObject $integration;
14
15 public function __construct(GoogleSheetIntegrationValueObject $integration)
16 {
17 $this->integration = $integration;
18 }
19
20 public function getId(): ?int
21 {
22 return $this->integration->getId();
23 }
24
25 public function getFormId(): int
26 {
27 return $this->integration->getFormId();
28 }
29
30 public function getSpreadsheetId(): string
31 {
32 return $this->integration->getSpreadsheetId();
33 }
34
35 public function getSpreadsheetName(): string
36 {
37 return $this->integration->getSpreadsheetName();
38 }
39
40 public function getWorksheetName(): string
41 {
42 return $this->integration->getWorksheetName();
43 }
44
45 /**
46 * @return list<array{column: string, value: string}>
47 */
48 public function getFieldMapping(): array
49 {
50 return $this->integration->getFieldMapping();
51 }
52
53 /**
54 * @return array<string, mixed>
55 */
56 public function getSmartLogic(): array
57 {
58 return $this->integration->getSmartLogic();
59 }
60
61 public function isEnabled(): bool
62 {
63 return $this->integration->isEnabled();
64 }
65
66 public function getLastStatus(): ?string
67 {
68 return $this->integration->getLastStatus();
69 }
70
71 public function getLastRunAt(): ?DateTime
72 {
73 return $this->integration->getLastRunAt();
74 }
75
76 public function getCreatedAt(): ?DateTime
77 {
78 return $this->integration->getCreatedAt();
79 }
80
81 public function getUpdatedAt(): ?DateTime
82 {
83 return $this->integration->getUpdatedAt();
84 }
85
86 public function setId(int $id): void
87 {
88 $this->integration->id = $id;
89 }
90
91 public function setSpreadsheetId(string $spreadsheetId): void
92 {
93 $this->integration->spreadsheetId = $spreadsheetId;
94 }
95
96 public function setSpreadsheetName(string $spreadsheetName): void
97 {
98 $this->integration->spreadsheetName = $spreadsheetName;
99 }
100
101 public function setWorksheetName(string $worksheetName): void
102 {
103 $this->integration->worksheetName = $worksheetName;
104 }
105
106 /**
107 * @param list<array{column: string, value: string}> $fieldMapping
108 */
109 public function setFieldMapping(array $fieldMapping): void
110 {
111 $this->integration->fieldMapping = $fieldMapping;
112 }
113
114 /**
115 * @param array<string, mixed> $smartLogic
116 */
117 public function setSmartLogic(array $smartLogic): void
118 {
119 $this->integration->smartLogic = $smartLogic;
120 }
121
122 public function setEnabled(bool $enabled): void
123 {
124 $this->integration->enabled = $enabled;
125 }
126
127 public function setLastStatus(?string $lastStatus): void
128 {
129 $this->integration->lastStatus = $lastStatus;
130 }
131
132 public function setLastRunAt(?DateTime $lastRunAt): void
133 {
134 $this->integration->lastRunAt = $lastRunAt;
135 }
136
137 /**
138 * @return array<string, mixed>
139 */
140 public function toArray(): array
141 {
142 return $this->integration->toArray();
143 }
144 }
145