| @@ -1,46 +1,0 @@ | ||
| 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 | -use AcyMailing\Controllers\Shared\EditorActions; | |
| 11 | - | |
| 12 | -class MailsController extends AcymController | |
| 13 | -{ | |
| 14 | - use Listing; | |
| 15 | - use Edition; | |
| 16 | - use Automation; | |
| 17 | - use EditorActions; | |
| 18 | - | |
| 19 | - public function __construct() | |
| 20 | - { | |
| 21 | - parent::__construct(); | |
| 22 | - | |
| 23 | - $type = acym_getVar('string', 'type', ''); | |
| 24 | - $this->setBreadcrumb($type); | |
| 25 | - acym_header('X-XSS-Protection:0'); | |
| 26 | - } | |
| 27 | - | |
| 28 | - protected function setBreadcrumb(string $type): void | |
| 29 | - { | |
| 30 | - switch ($type) { | |
| 31 | - case MailClass::TYPE_AUTOMATION: | |
| 32 | - $breadcrumbTitle = 'ACYM_AUTOMATION'; | |
| 33 | - $breadcrumbUrl = acym_completeLink('automation'); | |
| 34 | - break; | |
| 35 | - case MailClass::TYPE_FOLLOWUP: | |
| 36 | - $breadcrumbTitle = 'ACYM_EMAILS'; | |
| 37 | - $breadcrumbUrl = acym_completeLink('mails'); | |
| 38 | - break; | |
| 39 | - default: | |
| 40 | - $breadcrumbTitle = 'ACYM_TEMPLATES'; | |
| 41 | - $breadcrumbUrl = acym_completeLink('mails'); | |
| 42 | - } | |
| 43 | - | |
| 44 | - $this->breadcrumb[acym_translation($breadcrumbTitle)] = $breadcrumbUrl; | |
| 45 | - } | |
| 46 | -} | |