serviceLocator); \Utility\Registry::addDynamicConfig( \Utility\Registry::getEntityManager() ->getRepository('Config\Entity\Config') ->find(1) ->toArray() ); $service = new \Stock\Service\Import(); $service->setWorkflow($this->serviceLocator->get('Stock')); $filename = $this->getRequest()->getParam('filename'); $service->scriptUpdateVehicleData($filename); return "\n"; } public function bulkImportAction() { \Utility\Registry::setServiceManager($this->serviceLocator); \Utility\Registry::addDynamicConfig( \Utility\Registry::getEntityManager() ->getRepository('Config\Entity\Config') ->find(1) ->toArray() ); $service = new \Stock\Service\BulkImport(); $service->setWorkflow($this->serviceLocator->get('Stock')); $filename = $this->getRequest()->getParam('filename'); $importType = $this->getRequest()->getParam('importType'); $userId = $this->getRequest()->getParam('userId'); $companyId = $this->getRequest()->getParam('companyId'); $service->scriptUpdateVehicleData($filename,$importType,$userId,$companyId); return "\n"; } public function pushChangeAction() { \Utility\Registry::setServiceManager($this->serviceLocator); \Utility\Registry::addDynamicConfig( \Utility\Registry::getEntityManager() ->getRepository('Config\Entity\Config') ->find(1) ->toArray() ); $service = new \Stock\Service\Stock(); $service->setWorkflow($this->serviceLocator->get('Stock')); $changeCode = $this->getRequest()->getParam('changeCode'); $id = $this->getRequest()->getParam('id'); $skipId = $this->getRequest()->getParam('skipId'); $service->pushChange($changeCode, $id, $skipId); return "\n"; } public function imageUploadAction() { \Utility\Registry::setServiceManager($this->serviceLocator); \Utility\Registry::addDynamicConfig( \Utility\Registry::getEntityManager() ->getRepository('Config\Entity\Config') ->find(1) ->toArray() ); $service = new \Stock\Service\Stock(); $service->setWorkflow($this->serviceLocator->get('Stock')); $service->uploadImages(); return "\n"; } public function cleanUpStockAndValuationDatabaseAction() { \Utility\Registry::setServiceManager($this->serviceLocator); \Utility\Registry::addDynamicConfig( \Utility\Registry::getEntityManager() ->getRepository('Config\Entity\Config') ->find(1) ->toArray() ); $valuationDate = $this->getRequest()->getParam('valuationDate'); $stockDate = $this->getRequest()->getParam('stockDate'); $service = new \Stock\Service\Stock(); $service->setWorkflow($this->serviceLocator->get('Stock')); $service->cleanUpStockAndValuationDatabase($valuationDate,$stockDate); } public function cleanUpStockAndValuationDatabaseWorkerAction() { \Utility\Registry::setServiceManager($this->serviceLocator); \Utility\Registry::addDynamicConfig( \Utility\Registry::getEntityManager() ->getRepository('Config\Entity\Config') ->find(1) ->toArray() ); $id = $this->getRequest()->getParam('id'); $currentStatus = $this->getRequest()->getParam('currentStatus'); $table = $this->getRequest()->getParam('table'); $service = new \Stock\Service\Stock(); $service->setWorkflow($this->serviceLocator->get('Stock')); $service->cleanUpStockAndValuationDatabaseWorker($id,$currentStatus,$table); } public function exportDataForGemsAction() { \Utility\Registry::setServiceManager($this->serviceLocator); \Utility\Registry::addDynamicConfig( \Utility\Registry::getEntityManager() ->getRepository('Config\Entity\Config') ->find(1) ->toArray() ); $service = new \Stock\Service\Stock(); $service->setWorkflow($this->serviceLocator->get('Stock')); $service->exportDataForGems(); } }