[ 'prefix' => 't', 'longPrefix' => 'user-type', 'required' => true, 'description' => 'Type of user to import (test-taker, administrator, proctor, sync-manager).', ], 'file-path' => [ 'prefix' => 'f', 'longPrefix' => 'file-path', 'required' => true, 'description' => 'File path location.', ], ]; } protected function provideDescription() { return 'Import users (test-taker, administrator, proctor, sync-manager).'; } /** * @return \common_report_Report * @throws \common_exception_NotFound * @throws \oat\oatbox\service\exception\InvalidService * @throws \oat\oatbox\service\exception\InvalidServiceManagerException */ protected function run() { /** @var UserCsvImporterFactory $userImporter */ $userImporter = $this->getServiceLocator()->get(UserCsvImporterFactory::SERVICE_ID); $importer = $userImporter->create($this->getOption('user-type')); return $importer->import($this->getOption('file-path')); } }