CoolCMS API

ExternalConnections
in package

FinalYes

Runtime view of the installed external connections: is it enabled, what are its values. Read once per request (and from the Redis query cache between requests), so toggling a connection in the administration takes effect immediately — no config edit, no cache purge.

Fail-safe: when the table cannot be read (migration not applied yet), every connection counts as not installed and consumers fall back to their defaults.

Table of Contents

Properties

$manager  : ExternalConnectionManager
$queryCache  : QueryCache
$registry  : ConnectionTypeRegistry
$rows  : array<string, array{enabled: bool, config: array}>|null

Methods

__construct()  : mixed
isEnabled()  : bool
isInstalled()  : bool
publicValues()  : array<string, scalar|null>
Only the values that may reach the browser.
reset()  : void
After a write in the same request (administration save).
value()  : string|int|float|bool|null
values()  : array<string, scalar|null>
Stored values limited to the fields the type declares.
loadRows()  : array<string, array{enabled: bool, config: array}>
rows()  : array<string, array{enabled: bool, config: array}>

Properties

Methods

isEnabled()

public isEnabled(string $code) : bool
Parameters
$code : string
Return values
bool

isInstalled()

public isInstalled(string $code) : bool
Parameters
$code : string
Return values
bool

publicValues()

Only the values that may reach the browser.

public publicValues(string $code) : array<string, scalar|null>
Parameters
$code : string
Return values
array<string, scalar|null>

reset()

After a write in the same request (administration save).

public reset() : void

value()

public value(string $code, string $field) : string|int|float|bool|null
Parameters
$code : string
$field : string
Return values
string|int|float|bool|null

values()

Stored values limited to the fields the type declares.

public values(string $code) : array<string, scalar|null>
Parameters
$code : string
Return values
array<string, scalar|null>

loadRows()

private loadRows() : array<string, array{enabled: bool, config: array}>
Return values
array<string, array{enabled: bool, config: array}>

rows()

private rows() : array<string, array{enabled: bool, config: array}>
Return values
array<string, array{enabled: bool, config: array}>
On this page

Search results