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


PHP AbstractCollection::load方法代碼示例

本文整理匯總了PHP中Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::load方法的典型用法代碼示例。如果您正苦於以下問題:PHP AbstractCollection::load方法的具體用法?PHP AbstractCollection::load怎麽用?PHP AbstractCollection::load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Framework\Model\Resource\Db\Collection\AbstractCollection的用法示例。


在下文中一共展示了AbstractCollection::load方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: load

 /**
  * Load collection data
  *
  * @param bool $printQuery
  * @param bool $logQuery
  * @return  \Magento\GoogleShopping\Model\Resource\Attribute\Collection
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     if ($this->getJoinAttributeSetFlag()) {
         $this->_joinAttributeSet();
     }
     parent::load($printQuery, $logQuery);
     return $this;
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:18,代碼來源:Collection.php

示例2: load

 /**
  * Load data
  *
  * @param boolean $printQuery
  * @param boolean $logQuery
  * @return $this
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     $this->_eventManager->dispatch('review_review_collection_load_before', ['collection' => $this]);
     parent::load($printQuery, $logQuery);
     if ($this->_addStoreDataFlag) {
         $this->_addStoreData();
     }
     return $this;
 }
開發者ID:opexsw,項目名稱:magento2,代碼行數:19,代碼來源:Collection.php

示例3: load

 /**
  * Adds subscribers info to select and loads collection
  *
  * @param bool $printQuery
  * @param bool $logQuery
  * @return $this
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->_addSubscribersFlag && !$this->isLoaded()) {
         $this->_addSubscriberInfoToSelect();
     }
     return parent::load($printQuery, $logQuery);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:14,代碼來源:Collection.php

示例4: load

 /**
  * Load collection data
  *
  * @param boolean $printQuery
  * @param boolean $logQuery
  * @return $this
  */
 public function load($printQuery = false, $logQuery = false)
 {
     $this->unshiftOrder('main_table.name', \Magento\Framework\DB\Select::SQL_ASC)->unshiftOrder('main_table.sort_order', \Magento\Framework\DB\Select::SQL_ASC);
     // website sort order FIRST
     return parent::load($printQuery, $logQuery);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:13,代碼來源:Collection.php

示例5: load

 /**
  * Load data (join attribute data)
  *
  * @param bool $printQuery
  * @param bool $logQuery
  * @return $this
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if (!$this->isLoaded()) {
         $this->_joinAttributeData();
     }
     return parent::load($printQuery, $logQuery);
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:14,代碼來源:Collection.php

示例6: load

 /**
  * Load data
  *
  * @param boolean $printQuery
  * @param boolean $logQuery
  * @return \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if ($this->isLoaded()) {
         return $this;
     }
     $this->_eventManager->dispatch('log_visitor_collection_load_before', ['collection' => $this]);
     return parent::load($printQuery, $logQuery);
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:15,代碼來源:Collection.php

示例7: load

 /**
  * Load collection data
  *
  * @param bool $printQuery
  * @param bool $logQuery
  * @return $this
  */
 public function load($printQuery = false, $logQuery = false)
 {
     if (!$this->getLoadDefault()) {
         $this->setWithoutDefaultFilter();
     }
     if (!$this->isLoaded()) {
         $this->addOrder('CASE WHEN main_table.store_id = 0 THEN 0 ELSE 1 END', \Magento\Framework\DB\Select::SQL_ASC)->addOrder('main_table.sort_order', \Magento\Framework\DB\Select::SQL_ASC)->addOrder('main_table.name', \Magento\Framework\DB\Select::SQL_ASC);
     }
     return parent::load($printQuery, $logQuery);
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:17,代碼來源:Collection.php


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