コード例 #1
0
ファイル: Collection.php プロジェクト: niranjanssiet/magento2
 /**
  * Constructor
  * Configures collection
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\Newsletter\\Model\\Subscriber', 'Magento\\Newsletter\\Model\\Resource\\Subscriber');
     $this->_queueLinkTable = $this->getTable('newsletter_queue_link');
     $this->_storeTable = $this->getTable('store');
     $this->_map['fields']['type'] = $this->getResource()->getReadConnection()->getCheckSql('main_table.customer_id = 0', 1, 2);
     $this->_map['fields']['website_id'] = 'store.website_id';
     $this->_map['fields']['group_id'] = 'store.group_id';
     $this->_map['fields']['store_id'] = 'main_table.store_id';
 }
コード例 #2
0
 /**
  * Constructor
  * Configures collection
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\Newsletter\\Model\\Subscriber', 'Magento\\Newsletter\\Model\\Resource\\Subscriber');
     $this->_queueLinkTable = $this->getTable('newsletter_queue_link');
     $this->_storeTable = $this->getTable('store');
     // defining mapping for fields represented in several tables
     $this->_map['fields']['customer_lastname'] = 'customer_lastname_table.value';
     $this->_map['fields']['customer_firstname'] = 'customer_firstname_table.value';
     $this->_map['fields']['type'] = $this->getResource()->getReadConnection()->getCheckSql('main_table.customer_id = 0', 1, 2);
     $this->_map['fields']['website_id'] = 'store.website_id';
     $this->_map['fields']['group_id'] = 'store.group_id';
     $this->_map['fields']['store_id'] = 'main_table.store_id';
 }
コード例 #3
0
ファイル: Collection.php プロジェクト: aiesh/magento2
 /**
  * Initialize collection items factory class
  *
  * @return void
  */
 protected function _construct()
 {
     $this->_init('Magento\\Paypal\\Model\\Payment\\Transaction', 'Magento\\Paypal\\Model\\Resource\\Payment\\Transaction');
     parent::_construct();
 }
コード例 #4
0
ファイル: Collection.php プロジェクト: aiesh/magento2
 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\CatalogRule\\Model\\Rule\\Product\\Price', 'Magento\\CatalogRule\\Model\\Resource\\Rule\\Product\\Price');
 }
コード例 #5
0
ファイル: Collection.php プロジェクト: aiesh/magento2
 /**
  * Define resource model
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\Core\\Model\\Layout\\Update', 'Magento\\Core\\Model\\Resource\\Layout\\Update');
 }
コード例 #6
0
ファイル: Collection.php プロジェクト: vasiljok/magento2
 /**
  * Define resource model
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\Widget\\Model\\Layout\\Link', 'Magento\\Widget\\Model\\Resource\\Layout\\Link');
 }
コード例 #7
0
 /**
  *  Define resource model
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\Core\\Model\\Variable', 'Magento\\Core\\Model\\Resource\\Variable');
 }
コード例 #8
0
 /**
  * Collection constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\SalesRule\\Model\\Rule\\Customer', 'Magento\\SalesRule\\Model\\Resource\\Rule\\Customer');
 }
コード例 #9
0
 /**
  *  Define resource model
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('SweetTooth\\Webhook\\Model\\Webhook', 'SweetTooth\\Webhook\\Model\\Resource\\Webhook');
 }
コード例 #10
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\Widget\\Model\\Widget\\Instance', 'Magento\\Widget\\Model\\Resource\\Widget\\Instance');
 }