WIKINDX API trunk

LOADICONS
in package

Load image icons used throughout WIKINDX

Table of Contents

Properties

$icons  : array<string|int, mixed>
array
$templateDir  : string|false
string

Methods

getIconRealFileName()  : array<string|int, mixed>
Return the real path of an icon from its basename
setupIcons()  : void
Set up icons for display.
storeIconInfo()  : void
Store in the class members a link for each standard icon

Properties

$icons

array

private array<string|int, mixed> $icons = []

$templateDir

string

private string|false $templateDir

Methods

getIconRealFileName()

Return the real path of an icon from its basename

private getIconRealFileName(string $basename[, string $filenameFallback = "" ][, mixed $urlFallback = "" ]) : array<string|int, mixed>

Return the path of the first icon available in the user's preferred template and in the default template if missing. The file is searched with the extensions in the following order: png, svg, jpg, jpeg, gif, webp, avif.

Parameters
$basename : string

Basename of a file icon

$filenameFallback : string = ""

A fallback path

$urlFallback : mixed = ""
Return values
array<string|int, mixed>

Path to an icon file or $filenameFallback value

setupIcons()

Set up icons for display.

private setupIcons() : void

The icons are not reset if this function is called a second time.

storeIconInfo()

Store in the class members a link for each standard icon

private storeIconInfo(string $basename) : void
Parameters
$basename : string
Tags
see
getIconRealFileName()

        
On this page

Search results