Heratio Framework API Reference

WatermarkSettingsService
in package

WatermarkSettingsService - Manages watermark configuration.

All watermark data now stored in framework tables:

  • object_watermark_setting (per-object settings)
  • watermark_type (system watermark types)
  • watermark_setting (global settings)
  • custom_watermark (uploaded custom watermarks)

Table of Contents

Methods

getAllSettings()  : array<string|int, mixed>
Get all global settings.
getObjectsWithWatermarks()  : array<string|int, mixed>
Get all objects with custom watermarks for Cantaloupe cache.
getSetting()  : string|null
Get a global setting value.
getWatermarkConfig()  : array<string|int, mixed>|null
Get watermark configuration for an object.
getWatermarkType()  : object|null
Get watermark type by ID.
getWatermarkTypeByCode()  : object|null
Get watermark type by code.
getWatermarkTypes()  : array<string|int, mixed>
Get all active watermark types.
saveObjectWatermark()  : bool
Save watermark settings for an object.
setSetting()  : bool
Set a global setting value.
updateCantaloupeCache()  : int
Update Cantaloupe cache file with all watermark configurations.

Methods

getAllSettings()

Get all global settings.

public static getAllSettings() : array<string|int, mixed>
Return values
array<string|int, mixed>

getObjectsWithWatermarks()

Get all objects with custom watermarks for Cantaloupe cache.

public static getObjectsWithWatermarks() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSetting()

Get a global setting value.

public static getSetting(string $key[, string|null $default = null ]) : string|null
Parameters
$key : string
$default : string|null = null
Return values
string|null

getWatermarkConfig()

Get watermark configuration for an object.

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

Priority:

  1. Security classification watermark (highest)
  2. Object-specific watermark (object_watermark_setting)
  3. Default watermark (global setting)
Parameters
$objectId : int
Return values
array<string|int, mixed>|null

getWatermarkType()

Get watermark type by ID.

public static getWatermarkType(int $id) : object|null
Parameters
$id : int
Return values
object|null

getWatermarkTypeByCode()

Get watermark type by code.

public static getWatermarkTypeByCode(string $code) : object|null
Parameters
$code : string
Return values
object|null

getWatermarkTypes()

Get all active watermark types.

public static getWatermarkTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

saveObjectWatermark()

Save watermark settings for an object.

public static saveObjectWatermark(int $objectId, int|null $watermarkTypeId[, bool $enabled = true ]) : bool
Parameters
$objectId : int
$watermarkTypeId : int|null
$enabled : bool = true
Return values
bool

setSetting()

Set a global setting value.

public static setSetting(string $key, string $value) : bool
Parameters
$key : string
$value : string
Return values
bool

updateCantaloupeCache()

Update Cantaloupe cache file with all watermark configurations.

public static updateCantaloupeCache() : int
Return values
int

        
On this page

Search results