PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.0.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.0.0
11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 10.3.0 10.4.0 All 60 releases
acymailing / back / Controllers / MailsController.php

MailsController.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress 11.0.0, at back/Controllers/MailsController.php

45 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace AcyMailing\Controllers;
4
5 use AcyMailing\Classes\MailClass;
6 use AcyMailing\Core\AcymController;
7 use AcyMailing\Controllers\Mails\Listing;
8 use AcyMailing\Controllers\Mails\Edition;
9 use AcyMailing\Controllers\Mails\Automation;
10
11 class MailsController extends AcymController
12 {
13 use Listing;
14 use Edition;
15 use Automation;
16
17 public function __construct()
18 {
19 parent::__construct();
20
21 $type = acym_getVar('string', 'type', '');
22 $this->setBreadcrumb($type);
23 acym_header('X-XSS-Protection:0');
24 }
25
26 protected function setBreadcrumb(string $type): void
27 {
28 switch ($type) {
29 case MailClass::TYPE_AUTOMATION:
30 $breadcrumbTitle = 'ACYM_AUTOMATION';
31 $breadcrumbUrl = acym_completeLink('automation');
32 break;
33 case MailClass::TYPE_FOLLOWUP:
34 $breadcrumbTitle = 'ACYM_EMAILS';
35 $breadcrumbUrl = acym_completeLink('mails');
36 break;
37 default:
38 $breadcrumbTitle = 'ACYM_TEMPLATES';
39 $breadcrumbUrl = acym_completeLink('mails');
40 }
41
42 $this->breadcrumb[acym_translation($breadcrumbTitle)] = $breadcrumbUrl;
43 }
44 }
45