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 
15 {
21  protected $_templateTable;
22 
28  public function _construct()
29  {
30  $this->_init(\Magento\Email\Model\Template::class, \Magento\Email\Model\ResourceModel\Template::class);
31  $this->_templateTable = $this->getMainTable();
32  }
33 
39  public function toOptionArray()
40  {
41  return $this->_toOptionArray('template_id', 'template_code');
42  }
43 }
_toOptionArray($valueField=null, $labelField='name', $additional=[])
Definition: AbstractDb.php:641