示例#1
0
文件: Grid.php 项目: aiesh/magento2
 /**
  * Prepare related orders collection
  *
  * @param array|string $fieldsToSelect
  * @return void
  */
 protected function _prepareRelatedOrders($fieldsToSelect = '*')
 {
     if (null === $this->_relatedOrders) {
         $this->_orderCollection->addFieldToSelect($fieldsToSelect)->addFieldToFilter('customer_id', $this->_registry->registry(RegistryConstants::CURRENT_CUSTOMER_ID))->setOrder('entity_id', 'desc');
         $this->_relatedOrders = $this->_recurringCollectionFilter->byIds($this->_orderCollection, $this->_recurringPayment->getId());
     }
 }
示例#2
0
文件: Orders.php 项目: aiesh/magento2
 /**
  * Prepare grid collection object
  *
  * @return $this
  */
 protected function _prepareCollection()
 {
     $collection = $this->_recurringCollectionFilter->byIds($this->_orderCollection->create(), $this->_coreRegistry->registry('current_recurring_payment')->getId());
     $this->setCollection($collection);
     return parent::_prepareCollection();
 }