本文整理汇总了PHP中Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::_construct方法的典型用法代码示例。如果您正苦于以下问题:PHP AbstractCollection::_construct方法的具体用法?PHP AbstractCollection::_construct怎么用?PHP AbstractCollection::_construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
的用法示例。
在下文中一共展示了AbstractCollection::_construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _construct
/**
* 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: _construct
/**
* 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: _construct
/**
* 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: _construct
/**
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->_init('Magento\\CatalogRule\\Model\\Rule\\Product\\Price', 'Magento\\CatalogRule\\Model\\Resource\\Rule\\Product\\Price');
}
示例5: _construct
/**
* Define resource model
*
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->_init('Magento\\Core\\Model\\Layout\\Update', 'Magento\\Core\\Model\\Resource\\Layout\\Update');
}
示例6: _construct
/**
* Collection constructor
*
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->_init('Magento\\SalesRule\\Model\\Rule\\Customer', 'Magento\\SalesRule\\Model\\Resource\\Rule\\Customer');
}
示例7: _construct
/**
* Define resource model
*
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->_init('SweetTooth\\Webhook\\Model\\Webhook', 'SweetTooth\\Webhook\\Model\\Resource\\Webhook');
}
示例8: _construct
/**
* Constructor
*
* @return void
*/
protected function _construct()
{
parent::_construct();
$this->_init('Magento\\Widget\\Model\\Widget\\Instance', 'Magento\\Widget\\Model\\Resource\\Widget\\Instance');
}