public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $services = $serviceLocator->getServiceLocator();
        /* @var $options ModuleOptions */
        $options = $services->get(ModuleOptions::class);

        $creationOptions = $options->toArray();

        // Use submit button by default
        if (!isset($creationOptions['use_submit_element'])) {
            $creationOptions['use_submit_element'] = true;
        }

        // Use reset button by default
        if (!isset($creationOptions['use_reset_element'])) {
            $creationOptions['use_reset_element'] = true;
        }

        return new ResetPassword('reset-password-form', $creationOptions);
    }
public function createService(ServiceLocatorInterface $serviceLocator)
    {
        $services = $serviceLocator->getServiceLocator();
        /* @var $options ModuleOptions */
        $options = $services->get(ModuleOptions::class);

        $creationOptions = $options->toArray();

        // Use submit button by default
        if (!isset($creationOptions['use_submit_element'])) {
            $creationOptions['use_submit_element'] = true;
        }

        // Use reset button by default
        if (!isset($creationOptions['use_reset_element'])) {
            $creationOptions['use_reset_element'] = true;
        }

        return new ResetPassword('reset-password-form', $creationOptions);
    }
{@inheritDoc}

@return ResetPassword