| 1 |
<?php |
| 2 |
|
| 3 |
namespace AcyMailing\Views\Campaigns; |
| 4 |
|
| 5 |
use AcyMailing\Core\AcymView; |
| 6 |
|
| 7 |
class CampaignsView extends AcymView |
| 8 |
{ |
| 9 |
public $followupSteps; |
| 10 |
|
| 11 |
public function __construct() |
| 12 |
{ |
| 13 |
parent::__construct(); |
| 14 |
|
| 15 |
$this->steps = [ |
| 16 |
'chooseTemplate' => 'ACYM_CHOOSE_TEMPLATE', |
| 17 |
'editEmail' => 'ACYM_EDIT_EMAIL', |
| 18 |
'recipients' => 'ACYM_RECIPIENTS', |
| 19 |
'sendSettings' => 'ACYM_SEND_SETTINGS', |
| 20 |
'tests' => 'ACYM_TEST', |
| 21 |
'summary' => 'ACYM_SUMMARY', |
| 22 |
]; |
| 23 |
|
| 24 |
$this->followupSteps = [ |
| 25 |
'followupTrigger' => 'ACYM_TRIGGER', |
| 26 |
'followupCondition' => 'ACYM_CONDITIONS', |
| 27 |
'followupEmail' => 'ACYM_EMAILS', |
| 28 |
'followupSummary' => 'ACYM_SUMMARY', |
| 29 |
]; |
| 30 |
|
| 31 |
$this->tabs = [ |
| 32 |
'campaigns' => 'ACYM_CAMPAIGNS', |
| 33 |
]; |
| 34 |
|
| 35 |
$this->tabs['followup'] = 'ACYM_FOLLOW_UP'; |
| 36 |
|
| 37 |
if (acym_isAllowed('mails')) { |
| 38 |
$this->tabs['welcome'] = 'ACYM_WELCOME_EMAILS'; |
| 39 |
$this->tabs['unsubscribe'] = 'ACYM_UNSUBSCRIBE_EMAILS'; |
| 40 |
} |
| 41 |
|
| 42 |
acym_trigger('onAcymDisplayCampaignListingSpecificTabs', [&$this->tabs]); |
| 43 |
|
| 44 |
$this->tabs['mailbox_action'] = 'ACYM_MAILBOX_ACTION_CAMPAIGN'; |
| 45 |
} |
| 46 |
|
| 47 |
public function addSegmentStep($displaySegmentTab) |
| 48 |
{ |
| 49 |
if (!$displaySegmentTab) { |
| 50 |
return; |
| 51 |
} |
| 52 |
$this->steps = [ |
| 53 |
'chooseTemplate' => 'ACYM_CHOOSE_TEMPLATE', |
| 54 |
'editEmail' => 'ACYM_EDIT_EMAIL', |
| 55 |
'recipients' => 'ACYM_RECIPIENTS', |
| 56 |
]; |
| 57 |
if (acym_isAllowed('segments')) { |
| 58 |
$this->steps['segment'] = 'ACYM_SEGMENT'; |
| 59 |
} |
| 60 |
$this->steps['sendSettings'] = 'ACYM_SEND_SETTINGS'; |
| 61 |
$this->steps['tests'] = 'ACYM_TEST'; |
| 62 |
$this->steps['summary'] = 'ACYM_SUMMARY'; |
| 63 |
} |
| 64 |
} |
| 65 |
|