Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Collection.php
Go to the documentation of this file.
1 <?php
7 
17 {
23  protected function _construct()
24  {
25  $this->_init(
26  \Magento\Newsletter\Model\Template::class,
27  \Magento\Newsletter\Model\ResourceModel\Template::class
28  );
29  }
30 
36  public function useOnlyActual()
37  {
38  $this->addFieldToFilter('template_actual', 1);
39 
40  return $this;
41  }
42 
48  public function toOptionArray()
49  {
50  return $this->_toOptionArray('template_id', 'template_code');
51  }
52 }
_toOptionArray($valueField=null, $labelField='name', $additional=[])
Definition: AbstractDb.php:641