PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.1
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.1
11.1.1 11.1.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 All 62 releases
← All changes | back/Controllers/Queue/Detailed.php +0 -79 10.11.1 → 11.1.1 View file →
@@ -1,79 +1,0 @@
1 -<?php
2 -
3 -namespace AcyMailing\Controllers\Queue;
4 -
5 -use AcyMailing\Classes\QueueClass;
6 -use AcyMailing\Classes\TagClass;
7 -use AcyMailing\Helpers\PaginationHelper;
8 -use AcyMailing\Helpers\ToolbarHelper;
9 -use AcyMailing\Helpers\WorkflowHelper;
10 -
11 -trait Detailed
12 -{
13 - public function detailed(): void
14 - {
15 - acym_setVar('layout', 'detailed');
16 - $pagination = new PaginationHelper();
17 -
18 - $searchFilter = $this->getVarFiltersListing('string', 'dqueue_search', '');
19 - $tagFilter = $this->getVarFiltersListing('string', 'dqueue_tag', '');
20 -
21 - $elementsPerPage = $pagination->getListLimit();
22 - $page = $this->getVarFiltersListing('int', 'dqueue_pagination_page', 1);
23 -
24 - $queueClass = new QueueClass();
25 - $matchingElements = $queueClass->getMatchingResults(
26 - [
27 - 'search' => $searchFilter,
28 - 'tag' => $tagFilter,
29 - 'elementsPerPage' => $elementsPerPage,
30 - 'offset' => ($page - 1) * $elementsPerPage,
31 - ]
32 - );
33 -
34 - $pagination->setStatus((int)$matchingElements['total']->total, $page, $elementsPerPage);
35 -
36 - $tagClass = new TagClass();
37 - $viewData = [
38 - 'allElements' => $matchingElements['elements'],
39 - 'pagination' => $pagination,
40 - 'search' => $searchFilter,
41 - 'tag' => $tagFilter,
42 - 'allTags' => $tagClass->getAllTagsByType(TagClass::TYPE_MAIL),
43 - 'workflowHelper' => new WorkflowHelper(),
44 - ];
45 -
46 - $this->prepareToolbarDetailed($viewData);
47 -
48 - $this->breadcrumb[acym_translation('ACYM_QUEUE_DETAILED')] = acym_completeLink('queue&task=detailed');
49 - parent::display($viewData);
50 - }
51 -
52 - public function prepareToolbarDetailed(array &$data): void
53 - {
54 - $toolbarHelper = new ToolbarHelper();
55 - $toolbarHelper->addSearchBar($data['search'], 'dqueue_search', 'ACYM_SEARCH');
56 - $otherContent = acym_modal(
57 - '<i class="acymicon-paper-plane"></i>'.acym_translation('ACYM_SEND_ALL'),
58 - '',
59 - null,
60 - ['data-reveal-larger' => true],
61 - [
62 - 'class' => 'cell medium-shrink button',
63 - 'data-reload' => 'true',
64 - 'data-ajax' => 'true',
65 - 'data-iframe' => '&ctrl=queue&task=continuesend&id=0&totalsend=0',
66 - ]
67 - );
68 - $toolbarHelper->addOtherContent($otherContent);
69 - $toolbarHelper->addFilterByTag($data, 'dqueue_tag', 'acym__queue__filter__tags acym__select');
70 -
71 - $data['toolbar'] = $toolbarHelper;
72 - $data['cleartask'] = 'detailed';
73 - if (!empty($data['tag'])) {
74 - $data['status_toolbar'] = [
75 - 'dqueue_tag' => $data['tag'],
76 - ];
77 - }
78 - }
79 -}