AutoincrementedIdTrait.php
3 years ago
CreatedAtTrait.php
3 years ago
DeletedAtTrait.php
3 years ago
SafeToOneAssociationLoadTrait.php
3 years ago
UpdatedAtTrait.php
3 years ago
ValidationGroupsTrait.php
2 years ago
index.php
3 years ago
DeletedAtTrait.php
28 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Doctrine\EntityTraits; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use DateTimeInterface; |
| 9 | use MailPoetVendor\Doctrine\ORM\Mapping as ORM; |
| 10 | |
| 11 | trait DeletedAtTrait { |
| 12 | /** |
| 13 | * @ORM\Column(type="datetimetz", nullable=true) |
| 14 | * @var DateTimeInterface|null |
| 15 | */ |
| 16 | private $deletedAt; |
| 17 | |
| 18 | /** @return DateTimeInterface|null */ |
| 19 | public function getDeletedAt() { |
| 20 | return $this->deletedAt; |
| 21 | } |
| 22 | |
| 23 | /** @param DateTimeInterface|null $deletedAt */ |
| 24 | public function setDeletedAt($deletedAt) { |
| 25 | $this->deletedAt = $deletedAt; |
| 26 | } |
| 27 | } |
| 28 |