| @@ -6,13 +6,8 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace IvyForms\Factory\Entry; |
| 9 | 9 | |
| 10 | -// phpcs:disable PSR1.Files.SideEffects | |
| 11 | -if (!defined('ABSPATH')) { | |
| 12 | - exit; // Exit if accessed directly | |
| 13 | -} | |
| 14 | - | |
| 15 | 10 | use IvyForms\Common\Exceptions\ValidationException; |
| 16 | 11 | use IvyForms\Entity\Entry\Entry as EntryEntity; |
| 17 | 12 | use IvyForms\Entity\EntryField\EntryField; |
| 18 | 13 | use IvyForms\Factory\EntryField\EntryFieldFactory; |
| @@ -57,8 +52,14 @@ | ||
| 57 | 52 | $entry->setFormId($data['formId']); |
| 58 | 53 | } |
| 59 | 54 | if (isset($data['userId'])) { |
| 60 | 55 | $entry->setUserId($data['userId']); |
| 56 | + } | |
| 57 | + if (isset($data['dateCreated'])) { | |
| 58 | + $entry->setDateCreated((string) $data['dateCreated']); | |
| 59 | + } | |
| 60 | + if (isset($data['dateEdited'])) { | |
| 61 | + $entry->setDateEdited((string) $data['dateEdited']); | |
| 61 | 62 | } |
| 62 | 63 | if (isset($data['status'])) { |
| 63 | 64 | $entry->setStatus($data['status']); |
| 64 | 65 | } |