getServiceLocator()->has(SynchronisationService::SERVICE_ID)) { /** @var SynchronisationService $service */ $service = $this->getServiceLocator()->get(SynchronisationService::SERVICE_ID); $actions = $service->getAvailableActions(); } else { $service = new SynchronisationService(); $actions = []; } $newActions = [ 'exitTest' => ExitTest::class, 'move' => Move::class, 'pause' => Pause::class, 'skip' => Skip::class, 'storeTraceData' => StoreTraceData::class, 'timeout' => Timeout::class, 'getNextItemData' => NextItemData::class ]; $service->setAvailableActions(array_merge($actions, $newActions)); $this->getServiceManager()->register(SynchronisationService::SERVICE_ID, $service); return \common_report_Report::createSuccess(__('SetSynchronisationService successfully configured.')); } }