Heratio Framework API Reference

IiifCollectionService
in package

Service for managing IIIF Collections (manifest groupings).

Supports IIIF Presentation API 3.0 collection format.

Table of Contents

Methods

__construct()  : mixed
addItem()  : int
Add an item (manifest) to a collection.
createCollection()  : int
Create a new collection.
deleteCollection()  : bool
Delete a collection.
generateCollectionJson()  : array<string|int, mixed>
Generate IIIF Collection JSON (Presentation API 3.0).
getAllCollections()  : array<string|int, mixed>
Get all collections (optionally filtered by parent).
getCollection()  : object|null
Get a single collection by ID or slug.
getCollectionItems()  : array<string|int, mixed>
Get items in a collection.
getCollectionsForObject()  : array<string|int, mixed>
Get collections containing a specific object.
getItemCount()  : int
Get item count for a collection.
removeItem()  : bool
Remove an item from a collection.
reorderItems()  : bool
Reorder items in a collection.
searchCollections()  : array<string|int, mixed>
Search collections.
updateCollection()  : bool
Update a collection.

Methods

addItem()

Add an item (manifest) to a collection.

public addItem(int $collectionId, array<string|int, mixed> $data) : int
Parameters
$collectionId : int
$data : array<string|int, mixed>
Return values
int

createCollection()

Create a new collection.

public createCollection(array<string|int, mixed> $data) : int
Parameters
$data : array<string|int, mixed>
Return values
int

deleteCollection()

Delete a collection.

public deleteCollection(int $id) : bool
Parameters
$id : int
Return values
bool

generateCollectionJson()

Generate IIIF Collection JSON (Presentation API 3.0).

public generateCollectionJson(int $collectionId) : array<string|int, mixed>
Parameters
$collectionId : int
Return values
array<string|int, mixed>

getAllCollections()

Get all collections (optionally filtered by parent).

public getAllCollections([int|null $parentId = null ][, bool $publicOnly = false ]) : array<string|int, mixed>
Parameters
$parentId : int|null = null
$publicOnly : bool = false
Return values
array<string|int, mixed>

getCollection()

Get a single collection by ID or slug.

public getCollection(mixed $identifier) : object|null
Parameters
$identifier : mixed
Return values
object|null

getCollectionItems()

Get items in a collection.

public getCollectionItems(int $collectionId) : array<string|int, mixed>
Parameters
$collectionId : int
Return values
array<string|int, mixed>

getCollectionsForObject()

Get collections containing a specific object.

public getCollectionsForObject(int $objectId) : array<string|int, mixed>
Parameters
$objectId : int
Return values
array<string|int, mixed>

getItemCount()

Get item count for a collection.

public getItemCount(int $collectionId) : int
Parameters
$collectionId : int
Return values
int

removeItem()

Remove an item from a collection.

public removeItem(int $itemId) : bool
Parameters
$itemId : int
Return values
bool

reorderItems()

Reorder items in a collection.

public reorderItems(int $collectionId, array<string|int, mixed> $itemIds) : bool
Parameters
$collectionId : int
$itemIds : array<string|int, mixed>
Return values
bool

searchCollections()

Search collections.

public searchCollections(string $query[, bool $publicOnly = true ]) : array<string|int, mixed>
Parameters
$query : string
$publicOnly : bool = true
Return values
array<string|int, mixed>

updateCollection()

Update a collection.

public updateCollection(int $id, array<string|int, mixed> $data) : bool
Parameters
$id : int
$data : array<string|int, mixed>
Return values
bool

        
On this page

Search results