本文整理汇总了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();
}
示例2: _prepareCollection
/**
* @return $this
*/
protected function _prepareCollection()
{
$collection = $this->_userRolesFactory->create();
$collection->setRolesFilter();
$this->setCollection($collection);
return parent::_prepareCollection();
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}
示例7: _prepareCollection
/**
* @return $this
*/
protected function _prepareCollection()
{
parent::_prepareCollection();
$collection = $this->_sliderFactory->getCollection();
$this->setCollection($collection);
return parent::_prepareCollection();
}
示例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();
}
示例9: _prepareCollection
/**
* @return $this
*/
protected function _prepareCollection()
{
$collection = $this->_collection;
$this->setCollection($collection);
parent::_prepareCollection();
return $this;
}
示例10: _prepareCollection
/**
* @return $this
*/
protected function _prepareCollection()
{
$collection = $this->_modelSampledata->create()->getCollection();
$this->setCollection($collection);
parent::_prepareCollection();
return $this;
}
示例11: _prepareCollection
protected function _prepareCollection()
{
$collection = $this->_bannerCollectionFactory->create()->setStoreViewId(null);
$collection->setIsLoadSliderTitle(TRUE);
$this->setCollection($collection);
return parent::_prepareCollection();
}
示例12: _prepareCollection
/**
* @return $this
*/
protected function _prepareCollection()
{
$collection = $this->_blogPostFactory->create()->getCollection();
$this->setCollection($collection);
parent::_prepareCollection();
return $this;
}
示例13: _prepareCollection
/**
* @return $this
*/
protected function _prepareCollection()
{
$collection = $this->_productsFactory->create()->addAttributeToSelect('entity_id')->addAttributeToSelect('name')->addWishlistCount();
$this->setCollection($collection);
parent::_prepareCollection();
return $this;
}
示例14: _prepareCollection
/**
* @return $this
*/
public function _prepareCollection()
{
$collection = $this->rulesFactory->create();
$this->setCollection($collection);
parent::_prepareCollection();
return $this;
}
示例15: _prepareCollection
/**
* @return $this
*/
protected function _prepareCollection()
{
$collection = $this->categoryCollectionFactory->create();
$collection = $collection->addAttributeToSelect('*');
$this->setCollection($collection);
return parent::_prepareCollection();
}