ImageBanks
Table of Contents
Interfaces
Classes
- Provider
- NoProvider
- Helper type used to indicate the absence of a (selected) Provider
- ProviderResult
- ProviderSearchResults
- ResourceSpaceProviderInstance
- Pixabay
- ResourceSpace
- Shutterstock
Functions
- autoloadProviders() : array<string|int, mixed>
- Autoload providers
-
getProviders()
: Provider>, 'errors': list
} - Get loaded providers
- validFileSource() : bool
- Check that the untrusted file is a valid Providers' (or its instance) source.
- listProviderInstanceNames() : array<string|int, mixed>
- List providers' (instance) name.
- isProviderActive() : bool
- Check if a Provider (or its instance) is selected as active from the plugins' setup page.
- providersCheckedAndActive() : array<string|int, mixed>
- Convert a list of providers to a list of providers (or their instances) that have all dependencies and are currently active.
- createProviderInstanceId() : callable
- Helper function to generate an instance ID based on its Provider ID.
- computeProviderBaseInstanceId() : int
- Helper function to compute a Providers' base ID (for multi-instance)
- getProviderSelectInstance() : Provider
- Get a Provider (or its instance if multi-instance supported).
- render_provider_search_result_link() : mixed
- Render a Providers' search result link
- render_view_metadata_item_narrow() : string
- Render information for the remote resource (generic term) view
Functions
autoloadProviders()
Autoload providers
autoloadProviders() : array<string|int, mixed>
Return values
array<string|int, mixed> —List of loaded provider names
getProviders()
Get loaded providers
getProviders(array<string|int, mixed> $loaded_providers) : Provider>, 'errors': list}
Parameters
- $loaded_providers : array<string|int, mixed>
Return values
Provider>, 'errors': listvalidFileSource()
Check that the untrusted file is a valid Providers' (or its instance) source.
validFileSource(string $file, Provider $provider) : bool
Parameters
- $file : string
-
Untrusted file URL
- $provider : Provider
-
Image bank Provider
Return values
boollistProviderInstanceNames()
List providers' (instance) name.
listProviderInstanceNames(Provider $provider) : array<string|int, mixed>
Parameters
- $provider : Provider
Return values
array<string|int, mixed> —Returns an array where the key is the Providers' (or its instance) ID and the value is its name
isProviderActive()
Check if a Provider (or its instance) is selected as active from the plugins' setup page.
isProviderActive(string $provider) : bool
Parameters
- $provider : string
-
A providers' (or instance) name
Return values
boolprovidersCheckedAndActive()
Convert a list of providers to a list of providers (or their instances) that have all dependencies and are currently active.
providersCheckedAndActive(array<int, Provider> $providers) : array<string|int, mixed>
Parameters
- $providers : array<int, Provider>
Return values
array<string|int, mixed> —Returns an array where the key is the Providers' (or its instance) ID and the value is its name
createProviderInstanceId()
Helper function to generate an instance ID based on its Provider ID.
createProviderInstanceId(Provider $provider) : callable
Parameters
- $provider : Provider
Return values
callablecomputeProviderBaseInstanceId()
Helper function to compute a Providers' base ID (for multi-instance)
computeProviderBaseInstanceId(Provider $provider) : int
Parameters
- $provider : Provider
Return values
intgetProviderSelectInstance()
Get a Provider (or its instance if multi-instance supported).
getProviderSelectInstance(array<string|int, Provider|MultipleInstanceProviderInterface> $providers, int $selected) : Provider
Parameters
- $providers : array<string|int, Provider|MultipleInstanceProviderInterface>
- $selected : int
-
ID for the selected Provider (or its instance)
Return values
Providerrender_provider_search_result_link()
Render a Providers' search result link
render_provider_search_result_link(ProviderResult $result, callable $content, array<string|int, mixed> $ctx) : mixed
Parameters
- $result : ProviderResult
-
The search result we're rendering the link for
- $content : callable
-
Link content. NEVER input unsafe data!
- $ctx : array<string|int, mixed>
-
External contextual info. Supported:
- class: array
- title: string
- force_provider_url: bool
render_view_metadata_item_narrow()
Render information for the remote resource (generic term) view
render_view_metadata_item_narrow(string $label, string $value) : string
Parameters
- $label : string
- $value : string