/** * 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'; }
/** * 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'; }
/** * 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(); }
/** * @return void */ protected function _construct() { parent::_construct(); $this->_init('Magento\\CatalogRule\\Model\\Rule\\Product\\Price', 'Magento\\CatalogRule\\Model\\Resource\\Rule\\Product\\Price'); }
/** * Define resource model * * @return void */ protected function _construct() { parent::_construct(); $this->_init('Magento\\Core\\Model\\Layout\\Update', 'Magento\\Core\\Model\\Resource\\Layout\\Update'); }
/** * Define resource model * * @return void */ protected function _construct() { parent::_construct(); $this->_init('Magento\\Widget\\Model\\Layout\\Link', 'Magento\\Widget\\Model\\Resource\\Layout\\Link'); }
/** * Define resource model * * @return void */ protected function _construct() { parent::_construct(); $this->_init('Magento\\Core\\Model\\Variable', 'Magento\\Core\\Model\\Resource\\Variable'); }
/** * Collection constructor * * @return void */ protected function _construct() { parent::_construct(); $this->_init('Magento\\SalesRule\\Model\\Rule\\Customer', 'Magento\\SalesRule\\Model\\Resource\\Rule\\Customer'); }
/** * Define resource model * * @return void */ protected function _construct() { parent::_construct(); $this->_init('SweetTooth\\Webhook\\Model\\Webhook', 'SweetTooth\\Webhook\\Model\\Resource\\Webhook'); }
/** * Constructor * * @return void */ protected function _construct() { parent::_construct(); $this->_init('Magento\\Widget\\Model\\Widget\\Instance', 'Magento\\Widget\\Model\\Resource\\Widget\\Instance'); }