Heratio Framework API Reference

DerivativeWatermarkService
in package

Table of Contents

Constants

USAGE_MASTER  = 140
USAGE_REFERENCE  = 141
USAGE_THUMBNAIL  = 142

Methods

applyWatermark()  : bool
Apply watermark to a derivative image file.
getCustomWatermarks()  : array<string|int, mixed>
Get custom watermarks (global and for specific object).
getWatermarkConfig()  : array<string|int, mixed>|null
Get watermark configuration for an object.
regenerateDerivatives()  : bool
Regenerate watermarked derivatives for an object.
uploadCustomWatermark()  : int|null
Upload a custom watermark.

Constants

Methods

applyWatermark()

Apply watermark to a derivative image file.

public static applyWatermark(string $imagePath, int $objectId) : bool
Parameters
$imagePath : string
$objectId : int
Return values
bool

getCustomWatermarks()

Get custom watermarks (global and for specific object).

public static getCustomWatermarks([int|null $objectId = null ]) : array<string|int, mixed>
Parameters
$objectId : int|null = null
Return values
array<string|int, mixed>

getWatermarkConfig()

Get watermark configuration for an object.

public static getWatermarkConfig(int $objectId) : array<string|int, mixed>|null

Priority: Security > Custom > Selected > Default

Parameters
$objectId : int
Return values
array<string|int, mixed>|null

regenerateDerivatives()

Regenerate watermarked derivatives for an object.

public static regenerateDerivatives(int $objectId) : bool

This recreates reference/thumbnail from master with new watermark.

Parameters
$objectId : int
Return values
bool

uploadCustomWatermark()

Upload a custom watermark.

public static uploadCustomWatermark(array<string|int, mixed> $file, string $name[, int|null $objectId = null ][, string $position = 'center' ][, float $opacity = 0.4 ][, int $userId = 0 ]) : int|null
Parameters
$file : array<string|int, mixed>
$name : string
$objectId : int|null = null
$position : string = 'center'
$opacity : float = 0.4
$userId : int = 0
Return values
int|null

        
On this page

Search results