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


PHP Extended::_prepareCollection方法代碼示例

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


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

示例1: _prepareCollection

 /**
  * Prepare collection
  *
  * @return \Magento\Backend\Block\Widget\Grid
  */
 protected function _prepareCollection()
 {
     $collection = $this->_collectionFactory->create();
     /* @var $collection \Magentostudy\News\Model\Resource\News\Grid\Collection */
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
開發者ID:dineshmalekar,項目名稱:magento2-extension-example,代碼行數:12,代碼來源:Grid.php

示例2: _prepareCollection

 /**
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->_userRolesFactory->create();
     $collection->setRolesFilter();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
開發者ID:nja78,項目名稱:magento2,代碼行數:10,代碼來源:Roles.php

示例3: _prepareCollection

 /**
  * Prepare rules collection
  *
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->ruleFactory->create()->getResourceCollection();
     $this->setCollection($collection);
     $this->_eventManager->dispatch('adminhtml_block_promo_widget_chooser_prepare_collection', ['collection' => $collection]);
     return parent::_prepareCollection();
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:12,代碼來源:Chooser.php

示例4: _prepareCollection

 /**
  * Prepare collection for grid
  *
  * @return $this
  */
 protected function _prepareCollection()
 {
     /** @var \Magento\Paypal\Model\ResourceModel\Billing\Agreement\Collection $collection */
     $collection = $this->_agreementFactory->create()->addCustomerDetails();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:12,代碼來源:Grid.php

示例5: _prepareCollection

 /**
  * Apply sorting and filtering to reports review collection
  *
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->_reviewsFactory->create()->addProductFilter((int) $this->getRequest()->getParam('id'));
     $this->setCollection($collection);
     parent::_prepareCollection();
     return $this;
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:12,代碼來源:Grid.php

示例6: _prepareCollection

 /**
  * @return $this
  */
 protected function _prepareCollection()
 {
     /** @var $collection \Magento\Newsletter\Model\Resource\Queue\Collection */
     $collection = $this->_collectionFactory->create()->addTemplateInfo()->addSubscriberFilter($this->_coreRegistry->registry('subscriber')->getId());
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:10,代碼來源:Grid.php

示例7: _prepareCollection

 /**
  * @return $this
  */
 protected function _prepareCollection()
 {
     parent::_prepareCollection();
     $collection = $this->_sliderFactory->getCollection();
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
開發者ID:kietluu,項目名稱:magento2-backend-training,代碼行數:10,代碼來源:Grid.php

示例8: _prepareCollection

 /**
  * @return \Magento\Backend\Block\Widget\Grid
  */
 protected function _prepareCollection()
 {
     $collection = $this->_collectionFactory->create();
     $collection->getEntity()->setStore(0);
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
開發者ID:aiesh,項目名稱:magento2,代碼行數:10,代碼來源:Grid.php

示例9: _prepareCollection

 /**
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->_collection;
     $this->setCollection($collection);
     parent::_prepareCollection();
     return $this;
 }
開發者ID:CelebrosLtd,項目名稱:M2_Celexport,代碼行數:10,代碼來源:Cron.php

示例10: _prepareCollection

 /**
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->_modelSampledata->create()->getCollection();
     $this->setCollection($collection);
     parent::_prepareCollection();
     return $this;
 }
開發者ID:Cedcoss14,項目名稱:Ced,代碼行數:10,代碼來源:Grid.php

示例11: _prepareCollection

 protected function _prepareCollection()
 {
     $collection = $this->_bannerCollectionFactory->create()->setStoreViewId(null);
     $collection->setIsLoadSliderTitle(TRUE);
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
開發者ID:mrtuvn,項目名稱:m2ce.dev,代碼行數:7,代碼來源:Banners.php

示例12: _prepareCollection

 /**
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->_blogPostFactory->create()->getCollection();
     $this->setCollection($collection);
     parent::_prepareCollection();
     return $this;
 }
開發者ID:ktplKunj,項目名稱:TestMagento,代碼行數:10,代碼來源:Grid.php

示例13: _prepareCollection

 /**
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->_productsFactory->create()->addAttributeToSelect('entity_id')->addAttributeToSelect('name')->addWishlistCount();
     $this->setCollection($collection);
     parent::_prepareCollection();
     return $this;
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:10,代碼來源:Grid.php

示例14: _prepareCollection

 /**
  * @return $this
  */
 public function _prepareCollection()
 {
     $collection = $this->rulesFactory->create();
     $this->setCollection($collection);
     parent::_prepareCollection();
     return $this;
 }
開發者ID:dotmailer,項目名稱:dotmailer-magento2-extension,代碼行數:10,代碼來源:Grid.php

示例15: _prepareCollection

 /**
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->categoryCollectionFactory->create();
     $collection = $collection->addAttributeToSelect('*');
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }
開發者ID:mirasvit,項目名稱:module-blog,代碼行數:10,代碼來源:Grid.php


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