Contentserv PHP API

CSColors
in package

Tags

Table of Contents

createColor()  : CSColor|null
Creates & stores a color with the given values.
getColor()  : CSColor
Returns a color API object for a given id.
getColors()  : array<string|int, CSColor>
Returns the color API objects for a given filter and sort order.
getStandardColors()  : array<string|int, mixed>
Returns the standard colors.

Methods

createColor()

Creates & stores a color with the given values.

public static createColor(string $sLabel[, string $sColorValue = '' ][, string $sTextColor = '' ][, bool $bIsActive = false ]) : CSColor|null
Parameters
$sLabel : string
$sColorValue : string = ''
$sTextColor : string = ''
$bIsActive : bool = false
Tags
Return values
CSColor|null

getColor()

Returns a color API object for a given id.

public static getColor([int|null $iColorId = null ]) : CSColor
Parameters
$iColorId : int|null = null
Tags
Return values
CSColor

getColors()

Returns the color API objects for a given filter and sort order.

public static getColors([string $sColorFilter = '1=1' ][, string $sSortOrder = '' ][, bool $bOnlyActiveColors = false ]) : array<string|int, CSColor>
Parameters
$sColorFilter : string = '1=1'

The color filter.

$sSortOrder : string = ''

The requested sort order of the colors.

$bOnlyActiveColors : bool = false

If only active colors should be returned.

Tags
Return values
array<string|int, CSColor>

array with color objects

getStandardColors()

Returns the standard colors.

public static getStandardColors([bool $bRGBColors = false ]) : array<string|int, mixed>
Parameters
$bRGBColors : bool = false

If the standard colors should be returned with RGB definition.

Tags
Return values
array<string|int, mixed>

with the standard colors.


        

Search results