phpdftk API Documentation

CalloutStyle
in package

FinalYes

Per-call style overrides for {@see Pdf::addCallout()} / {@see Writer\Page::drawCallout()}.

All colour fields are nullable: null means "use the CalloutType's built-in default". The two scalar fields (padding, barWidth) always have a value — there's no per-type default for those.

Table of Contents

Properties

$barColor  : array<string|int, mixed>|null
$barWidth  : float
$bgColor  : array<string|int, mixed>|null
$labelOverride  : string|null
$padding  : float
$showLabel  : bool
$textColor  : array<string|int, mixed>|null

Methods

__construct()  : mixed
resolveBarColor()  : array{float, float, float}
resolveBgColor()  : array{float, float, float}
resolveLabel()  : string

Properties

$barColor read-only

public array<string|int, mixed>|null $barColor = null

$bgColor read-only

public array<string|int, mixed>|null $bgColor = null

$labelOverride read-only

public string|null $labelOverride = null

$textColor read-only

public array<string|int, mixed>|null $textColor = null

Methods

__construct()

public __construct([float $padding = 8.0 ][, float $barWidth = 4.0 ][, array{float, float, float}|null $barColor = null ][, array{float, float, float}|null $bgColor = null ][, array{float, float, float}|null $textColor = null ][, bool $showLabel = true ][, string|null $labelOverride = null ]) : mixed
Parameters
$padding : float = 8.0

Internal padding around the body text.

$barWidth : float = 4.0

Left-edge bar thickness.

$barColor : array{float, float, float}|null = null

Override the type's default bar colour.

$bgColor : array{float, float, float}|null = null

Override the type's default background tint. null keeps the default; pass []-style explicit-white to disable.

$textColor : array{float, float, float}|null = null

Body text colour; null = theme default.

$showLabel : bool = true

Whether to render the title row (e.g. "Note", "Warning").

$labelOverride : string|null = null

Title text override; null = use CalloutType::defaultLabel().


        
On this page

Search results