Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Start.php
Go to the documentation of this file.
1 <?php
8 
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(),
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
Definition: queue.php:21