/** * Initialize export instance from scheduled operation * * @param Enterprise_ImportExport_Model_Scheduled_Operation $operation * @return Enterprise_ImportExport_Model_Export */ public function initialize(Enterprise_ImportExport_Model_Scheduled_Operation $operation) { $fileInfo = $operation->getFileInfo(); $attrsInfo = $operation->getEntityAttributes(); $data = array('entity' => $operation->getEntityType(), 'file_format' => $fileInfo['file_format'], 'export_filter' => $attrsInfo['export_filter'], 'operation_type' => $operation->getOperationType(), 'run_at' => $operation->getStartTime(), 'scheduled_operation_id' => $operation->getId()); if (isset($attrsInfo['skip_attr'])) { $data['skip_attr'] = $attrsInfo['skip_attr']; } $this->setData($data); return $this; }
/** * Initialize import instance from scheduled operation * * @param Enterprise_ImportExport_Model_Scheduled_Operation $operation * @return Enterprise_ImportExport_Model_Import */ public function initialize(Enterprise_ImportExport_Model_Scheduled_Operation $operation) { $this->setData(array('entity' => $operation->getEntityType(), 'behavior' => $operation->getBehavior(), 'operation_type' => $operation->getOperationType(), 'run_at' => $operation->getStartTime(), 'scheduled_operation_id' => $operation->getId())); return $this; }