mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-09 04:29:30 +00:00
Allow to associate settings forms with info providers
This commit is contained in:
parent
eaaf44b391
commit
ee33d743e6
7 changed files with 100 additions and 13 deletions
|
|
@ -39,8 +39,9 @@ interface InfoProviderInterface
|
|||
* - url?: The url of the provider (e.g. "https://www.digikey.com")
|
||||
* - disabled_help?: A help text which is shown when the provider is disabled, explaining how to enable it
|
||||
* - oauth_app_name?: The name of the OAuth app which is used for authentication (e.g. "ip_digikey_oauth"). If this is set a connect button will be shown
|
||||
* - settings_class?: The class name of the settings class which contains the settings for this provider (e.g. "App\Settings\InfoProviderSettings\DigikeySettings"). If this is set a link to the settings will be shown
|
||||
*
|
||||
* @phpstan-return array{ name: string, description?: string, logo?: string, url?: string, disabled_help?: string, oauth_app_name?: string }
|
||||
* @phpstan-return array{ name: string, description?: string, logo?: string, url?: string, disabled_help?: string, oauth_app_name?: string, settings_class?: class-string }
|
||||
*/
|
||||
public function getProviderInfo(): array;
|
||||
|
||||
|
|
@ -78,4 +79,4 @@ interface InfoProviderInterface
|
|||
* @return ProviderCapabilities[]
|
||||
*/
|
||||
public function getCapabilities(): array;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ class ReicheltProvider implements InfoProviderInterface
|
|||
'name' => 'Reichelt',
|
||||
'description' => 'Webscraping from reichelt.com to get part information',
|
||||
'url' => 'https://www.reichelt.com/',
|
||||
'disabled_help' => 'Enable provider in provider settings.'
|
||||
'disabled_help' => 'Enable provider in provider settings.',
|
||||
'settings_class' => ReicheltSettings::class,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue