setIdentifier('owncloud') ->addIdentifierAlias('\OC\Files\Storage\OwnCloud') // legacy compat ->setStorageClass('\OCA\Files_External\Lib\Storage\OwnCloud') ->setText($l->t('Nextcloud')) ->addParameters([ new DefinitionParameter('host', $l->t('URL')), (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure https://'))) ->setType(DefinitionParameter::VALUE_BOOLEAN) ->setDefaultValue(true), (new DefinitionParameter('password', $l->t('Password'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL) ->setType(DefinitionParameter::VALUE_PASSWORD), ]) ->addAuthScheme(AuthMechanism::SCHEME_PASSWORD) ->setLegacyAuthMechanism($legacyAuth) ; } }