Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Subscriber.php
Go to the documentation of this file.
1 <?php
13 
15 
21 {
27  protected $_queueCollection = null;
28 
32  protected $_template = 'Magento_Newsletter::subscriber/list.phtml';
33 
38 
44  public function __construct(
45  \Magento\Backend\Block\Template\Context $context,
46  \Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory $collectionFactory,
47  array $data = []
48  ) {
49  $this->_collectionFactory = $collectionFactory;
50  parent::__construct($context, $data);
51  }
52 
58  protected function _beforeToHtml()
59  {
60  return parent::_beforeToHtml();
61  }
62 
68  public function getQueueCollection()
69  {
70  if ($this->_queueCollection === null) {
72  $this->_queueCollection = $this
73  ->_collectionFactory
74  ->create()
75  ->addTemplateInfo()
76  ->addOnlyUnsentFilter()
77  ->load();
78  }
79 
81  }
82 
88  public function getShowQueueAdd()
89  {
90  return $this->getChildBlock('grid')->getShowQueueAdd();
91  }
92 
98  public function getQueueAsOptions()
99  {
100  return $this->getQueueCollection()->toOptionArray();
101  }
102 }
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory $collectionFactory, array $data=[])
Definition: Subscriber.php:44