예제 #1
0
파일: Data.php 프로젝트: okite11/frames21
 /**
  * @return bool
  */
 public function perform()
 {
     $this->progress->start($this->getIterationsCount(), LogManager::LOG_LEVEL_INFO);
     foreach ($this->getDocumentList() as $methodToExecute => $document) {
         $destinationDocumentName = $document['destination'];
         $this->destination->clearDocument($destinationDocumentName);
         $this->progress->start(1, LogManager::LOG_LEVEL_DEBUG);
         $sourceGridDocument = array_flip($this->helper->getDocumentList())[$destinationDocumentName];
         $entityIds = $this->getEntityIdsFromSourceGrid($sourceGridDocument);
         if ($entityIds) {
             $this->destination->getAdapter()->insertFromSelect($this->{$methodToExecute}($document['columns'], $entityIds), $this->destination->addDocumentPrefix($destinationDocumentName), [], \Magento\Framework\Db\Adapter\AdapterInterface::INSERT_ON_DUPLICATE);
         }
         $this->progress->finish(LogManager::LOG_LEVEL_DEBUG);
     }
     $this->progress->finish(LogManager::LOG_LEVEL_INFO);
     return true;
 }
예제 #2
0
파일: Volume.php 프로젝트: okite11/frames21
 /**
  * Get iterations count for step
  *
  * @return int
  */
 protected function getIterationsCount()
 {
     return count($this->helper->getDocumentList());
 }
예제 #3
0
 /**
  * @inheritdoc
  */
 public function getDocumentList()
 {
     $documentList = parent::getDocumentList();
     $documentListArchive = ['enterprise_sales_order_grid_archive' => 'magento_sales_order_grid_archive', 'enterprise_sales_invoice_grid_archive' => 'magento_sales_invoice_grid_archive', 'enterprise_sales_shipment_grid_archive' => 'magento_sales_shipment_grid_archive', 'enterprise_sales_creditmemo_grid_archive' => 'magento_sales_creditmemo_grid_archive'];
     return array_merge($documentList, $documentListArchive);
 }