CustomFieldEntity.php
2 months ago
DynamicSegmentFilterData.php
2 months ago
DynamicSegmentFilterEntity.php
3 years ago
FeatureFlagEntity.php
3 years ago
FormEntity.php
1 week ago
LogEntity.php
3 years ago
NewsletterEntity.php
2 months ago
NewsletterLinkEntity.php
3 years ago
NewsletterOptionEntity.php
3 years ago
NewsletterOptionFieldEntity.php
1 month ago
NewsletterPostEntity.php
3 years ago
NewsletterSegmentEntity.php
3 years ago
NewsletterTemplateEntity.php
3 years ago
ScheduledTaskEntity.php
1 month ago
ScheduledTaskSubscriberEntity.php
1 year ago
SegmentEntity.php
2 months ago
SendingQueueEntity.php
2 months ago
SettingEntity.php
3 years ago
StatisticsBounceEntity.php
3 years ago
StatisticsClickEntity.php
3 years ago
StatisticsFormEntity.php
3 years ago
StatisticsNewsletterEntity.php
1 year ago
StatisticsOpenEntity.php
3 years ago
StatisticsUnsubscribeEntity.php
2 months ago
StatisticsWooCommercePurchaseEntity.php
2 years ago
StatsNotificationEntity.php
3 years ago
SubscriberCustomFieldEntity.php
3 years ago
SubscriberEntity.php
4 days ago
SubscriberIPEntity.php
3 years ago
SubscriberSegmentEntity.php
3 years ago
SubscriberTagEntity.php
4 years ago
TagEntity.php
3 years ago
UserAgentEntity.php
3 years ago
UserFlagEntity.php
3 years ago
WpPostEntity.php
2 years ago
index.php
3 years ago
NewsletterOptionFieldEntity.php
91 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Entities; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\Doctrine\EntityTraits\AutoincrementedIdTrait; |
| 9 | use MailPoet\Doctrine\EntityTraits\CreatedAtTrait; |
| 10 | use MailPoet\Doctrine\EntityTraits\UpdatedAtTrait; |
| 11 | use MailPoetVendor\Doctrine\ORM\Mapping as ORM; |
| 12 | use MailPoetVendor\Symfony\Component\Validator\Constraints as Assert; |
| 13 | |
| 14 | /** |
| 15 | * @ORM\Entity() |
| 16 | * @ORM\Table(name="newsletter_option_fields") |
| 17 | */ |
| 18 | class NewsletterOptionFieldEntity { |
| 19 | // names |
| 20 | public const NAME_AFTER_TIME_NUMBER = 'afterTimeNumber'; |
| 21 | public const NAME_AFTER_TIME_TYPE = 'afterTimeType'; |
| 22 | public const NAME_EVENT = 'event'; |
| 23 | public const NAME_GROUP = 'group'; |
| 24 | public const NAME_INTERVAL_TYPE = 'intervalType'; |
| 25 | public const NAME_IS_SCHEDULED = 'isScheduled'; |
| 26 | public const NAME_META = 'meta'; |
| 27 | public const NAME_MONTH_DAY = 'monthDay'; |
| 28 | public const NAME_NTH_WEEK_DAY = 'nthWeekDay'; |
| 29 | public const NAME_ROLE = 'role'; |
| 30 | public const NAME_SCHEDULE = 'schedule'; |
| 31 | public const NAME_SCHEDULED_AT = 'scheduledAt'; |
| 32 | public const NAME_SCHEDULE_MODE = 'scheduleMode'; |
| 33 | public const NAME_SCHEDULED_LOCAL_DATE = 'scheduledLocalDate'; |
| 34 | public const NAME_SCHEDULED_LOCAL_TIME = 'scheduledLocalTime'; |
| 35 | public const NAME_SEGMENT = 'segment'; |
| 36 | public const NAME_SEND_TO = 'sendTo'; |
| 37 | public const NAME_TIME_OF_DAY = 'timeOfDay'; |
| 38 | public const NAME_WEEK_DAY = 'weekDay'; |
| 39 | public const NAME_AUTOMATION_ID = 'automationId'; |
| 40 | public const NAME_AUTOMATION_STEP_ID = 'automationStepId'; |
| 41 | public const NAME_FILTER_SEGMENT_ID = 'filterSegmentId'; |
| 42 | public const NAME_SHARE_VISIBILITY = 'shareVisibility'; |
| 43 | public const NAME_EXCLUDE_FROM_ARCHIVE = 'excludeFromArchive'; |
| 44 | |
| 45 | use AutoincrementedIdTrait; |
| 46 | use CreatedAtTrait; |
| 47 | use UpdatedAtTrait; |
| 48 | |
| 49 | /** |
| 50 | * @ORM\Column(type="string") |
| 51 | * @Assert\NotBlank() |
| 52 | * @var string |
| 53 | */ |
| 54 | private $name; |
| 55 | |
| 56 | /** |
| 57 | * @ORM\Column(type="string") |
| 58 | * @Assert\NotBlank() |
| 59 | * @var string |
| 60 | */ |
| 61 | private $newsletterType; |
| 62 | |
| 63 | /** |
| 64 | * @return string |
| 65 | */ |
| 66 | public function getName() { |
| 67 | return $this->name; |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * @param string $name |
| 72 | */ |
| 73 | public function setName($name) { |
| 74 | $this->name = $name; |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * @return string |
| 79 | */ |
| 80 | public function getNewsletterType() { |
| 81 | return $this->newsletterType; |
| 82 | } |
| 83 | |
| 84 | /** |
| 85 | * @param string $newsletterType |
| 86 | */ |
| 87 | public function setNewsletterType($newsletterType) { |
| 88 | $this->newsletterType = $newsletterType; |
| 89 | } |
| 90 | } |
| 91 |