當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AbstractCollection::_construct方法代碼示例

本文整理匯總了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';
 }
開發者ID:niranjanssiet,項目名稱:magento2,代碼行數:17,代碼來源:Collection.php

示例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';
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:20,代碼來源:Collection.php

示例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();
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:10,代碼來源:Collection.php

示例4: _construct

 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\CatalogRule\\Model\\Rule\\Product\\Price', 'Magento\\CatalogRule\\Model\\Resource\\Rule\\Product\\Price');
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:8,代碼來源:Collection.php

示例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');
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:10,代碼來源:Collection.php

示例6: _construct

 /**
  * Collection constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\SalesRule\\Model\\Rule\\Customer', 'Magento\\SalesRule\\Model\\Resource\\Rule\\Customer');
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:10,代碼來源:Collection.php

示例7: _construct

 /**
  *  Define resource model
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('SweetTooth\\Webhook\\Model\\Webhook', 'SweetTooth\\Webhook\\Model\\Resource\\Webhook');
 }
開發者ID:defyasdf,項目名稱:magento2-module-webhook,代碼行數:10,代碼來源:Collection.php

示例8: _construct

 /**
  * Constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->_init('Magento\\Widget\\Model\\Widget\\Instance', 'Magento\\Widget\\Model\\Resource\\Widget\\Instance');
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:10,代碼來源:Collection.php


注:本文中的Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::_construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。