本文整理匯總了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');
}