1 | <?php |
||
43 | class JobSnapshot extends Job implements SnapshotInterface, SnapshotAttributesProviderInterface |
||
44 | { |
||
45 | use SnapshotTrait; |
||
46 | |||
47 | const SNAPSHOTMETA_ENTITY_CLASS = JobSnapshotMeta::class; |
||
48 | |||
49 | /** |
||
50 | * |
||
51 | * @ODM\ReferenceOne(targetDocument="\Jobs\Entity\Job", inversedBy="snapshots", storeAs="id") |
||
52 | * @var JobSnapshotMeta |
||
53 | */ |
||
54 | private $snapshotEntity; |
||
55 | |||
56 | protected $snapshotAttributes = [ |
||
57 | 'title', 'company', 'organization', 'contactEmail', 'language', |
||
58 | 'location', 'locations', 'link', 'datePublishStart', 'datePublishEnd', |
||
59 | 'reference', 'atsEnabled', 'template', 'uriApply', 'templateValues', |
||
60 | 'classifications', 'atsMode', 'metaData', |
||
61 | ]; |
||
62 | |||
63 | private $snapshotDiffSpecs = [ |
||
64 | 'title', |
||
65 | 'company', |
||
66 | 'organization', |
||
67 | 'locations' => [ |
||
68 | 'city', 'region', 'postalcode', 'country' |
||
69 | ], |
||
70 | 'templateValues' => [ |
||
71 | 'qualifications' |
||
72 | ], |
||
73 | ]; |
||
74 | |||
75 | public function getId() |
||
79 | |||
80 | public function getSnapshotId() |
||
84 | |||
85 | public function getSnapshotDraft() |
||
89 | |||
90 | public function hasSnapshotDraft() |
||
94 | |||
95 | public function getResourceId() |
||
99 | |||
100 | public function setApplyId($applyId) |
||
104 | |||
105 | public function getApplyId() |
||
109 | |||
110 | public function setUser(UserInterface $user) |
||
114 | |||
115 | public function getUser() |
||
119 | |||
120 | public function unsetUser($removePermissions = true) |
||
124 | |||
125 | public function setApplications(Collection $applications) |
||
129 | |||
130 | public function getApplications() |
||
134 | |||
135 | public function getUnreadApplications() |
||
139 | |||
140 | |||
141 | public function changeStatus($status, $message = '[System]') |
||
145 | |||
146 | public function getStatus() |
||
150 | |||
151 | public function setStatus($status) |
||
155 | |||
156 | public function setHistory(Collection $history) |
||
160 | |||
161 | public function getHistory() |
||
165 | |||
166 | public function setTermsAccepted($termsAccepted) |
||
170 | |||
171 | public function getTermsAccepted() |
||
175 | |||
176 | public function getUriPublisher() |
||
180 | |||
181 | public function setUriPublisher($uriPublisher) |
||
185 | |||
186 | public function getPublisher($key) |
||
190 | |||
191 | public function setPublisherReference($key, $reference) |
||
195 | |||
196 | public function getPermissions() |
||
207 | |||
208 | public function setPermissions(PermissionsInterface $permissions) |
||
212 | |||
213 | public function setPortals(array $portals) |
||
217 | |||
218 | public function getPortals() |
||
222 | |||
223 | public function isActive() |
||
227 | |||
228 | public function getDateCreated() |
||
232 | |||
233 | public function setDateCreated($dateCreated = null) |
||
236 | |||
237 | public function getDateModified() |
||
241 | |||
242 | public function setDateModified($dateModified = null) |
||
245 | |||
246 | public function __toString() |
||
250 | } |
||
251 |