code: public function createService(ServiceLocatorInterface $serviceLocator)
      {
          $services = $serviceLocator->getServiceLocator();
  
          /* @var $options UserServiceOptionsInterface */
          $options = $services->get(ModuleOptions::class);
  
          /* @var $passwordGenerator \CmsCommon\Crypt\PasswordGeneratorInterface */
          $passwordGenerator = $services->get($options->getPasswordGeneratorService());
  
          /* @var $mailService \CmsMailer\Service\MailServiceInterface */
          $mailService = $services->get($options->getMailService());
          $mailService->setFromAddress($options->getSenderEmailAddress())
                      ->setFromName($options->getSenderName());
  
          return new UserService($options, $serviceLocator, $passwordGenerator, $mailService);
      }
docs: {@inheritDoc}
  
  @return UserServiceInterface