Documentation

ImageBanks

Table of Contents

Interfaces

MultipleInstanceProviderInterface
ProviderInstanceInterface

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': list}

validFileSource()

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
bool

listProviderInstanceNames()

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
bool

providersCheckedAndActive()

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
callable

computeProviderBaseInstanceId()

Helper function to compute a Providers' base ID (for multi-instance)

computeProviderBaseInstanceId(Provider $provider) : int
Parameters
$provider : Provider
Return values
int

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
Return values
string
On this page

Search results