当前位置: 首页>>代码示例>>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;未经允许,请勿转载。