Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-newsletter
Controller
Adminhtml
Queue
Start.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Newsletter\Controller\Adminhtml\Queue
;
8
9
class
Start
extends
\Magento\Newsletter\Controller\Adminhtml\Queue
10
{
16
public
function
execute
()
17
{
18
$queue
= $this->_objectManager->create(
19
\
Magento
\Newsletter\Model\Queue::class
20
)->load(
21
$this->
getRequest
()->getParam(
'id'
)
22
);
23
if
(
$queue
->getId()) {
24
if
(!in_array(
25
$queue
->getQueueStatus(),
26
[
\Magento\Newsletter\Model\Queue::STATUS_NEVER
,
\Magento\Newsletter\Model\Queue::STATUS_PAUSE
]
27
)
28
) {
29
$this->
_redirect
(
'*/*'
);
30
return
;
31
}
32
33
$queue
->setQueueStartAt(
34
$this->_objectManager->get(\
Magento
\Framework\Stdlib\DateTime\DateTime::class)->gmtDate()
35
)->setQueueStatus(
36
\
Magento
\Newsletter\Model\Queue::STATUS_SENDING
37
)->save();
38
}
39
40
$this->
_redirect
(
'*/*'
);
41
}
42
}
$queue
$queue
Definition:
queue.php:21
Magento\Newsletter\Controller\Adminhtml\Queue\Start\execute
execute()
Definition:
Start.php:16
Magento\Backend\App\AbstractAction\_redirect
_redirect($path, $arguments=[])
Definition:
AbstractAction.php:316
Magento\Framework\App\Action\AbstractAction\getRequest
getRequest()
Definition:
AbstractAction.php:60
Magento\Newsletter\Model\Queue\STATUS_PAUSE
const STATUS_PAUSE
Definition:
Queue.php:78
Magento
Magento\Newsletter\Controller\Adminhtml\Queue\Start
Definition:
Start.php:9
Magento\Newsletter\Model\Queue\STATUS_NEVER
const STATUS_NEVER
Definition:
Queue.php:70
Magento\Newsletter\Controller\Adminhtml\Queue
Definition:
Queue.php:14
Magento\Newsletter\Controller\Adminhtml\Queue
Definition:
Cancel.php:7