DigitalObjectRepository
in package
Digital Object Repository
Pure Laravel Query Builder implementation for digital object lookups.
Tags
Table of Contents
Methods
- createDerivative() : int
- Create a derivative digital object
- delete() : bool
- Delete a digital object and its derivatives
- findAllByInformationObjectId() : array<string|int, mixed>
- Get all digital objects for an information object
- findById() : object|null
- Get digital object by ID
- findByInformationObjectId() : object|null
- Get digital object for an information object
- findBySlug() : object|null
- Get digital object by slug
- getChildByUsageId() : object|null
- Get child digital object by usage ID
- getDerivatives() : array<string|int, mixed>
- Get derivatives (thumbnail, reference) for a digital object
- getMediaTypeIds() : array<string|int, mixed>
- Get media type ID constants
- getMediaTypeName() : string
- Get media type name
- getParentObject() : object|null
- Get parent object for a digital object
- getParentObjectByObjectId() : object|null
- Get parent object by object_id field
- getPropertyValue() : string|null
- Get property value for a digital object
- getUsageIds() : array<string|int, mixed>
- Get usage ID constants
- getUsageTypeName() : string
- Get usage type name
- hasDigitalObject() : bool
- Check if digital object exists for information object
- saveProperty() : void
- Save property for a digital object
- update() : bool
- Update digital object
Methods
createDerivative()
Create a derivative digital object
public
createDerivative(int $parentId, int $usageId, string $filename, string $content[, string|null $language = null ]) : int
Parameters
- $parentId : int
- $usageId : int
- $filename : string
- $content : string
- $language : string|null = null
Return values
intdelete()
Delete a digital object and its derivatives
public
delete(int $digitalObjectId) : bool
Parameters
- $digitalObjectId : int
Return values
boolfindAllByInformationObjectId()
Get all digital objects for an information object
public
findAllByInformationObjectId(int $informationObjectId) : array<string|int, mixed>
Parameters
- $informationObjectId : int
Return values
array<string|int, mixed>findById()
Get digital object by ID
public
findById(int $id) : object|null
Parameters
- $id : int
Return values
object|nullfindByInformationObjectId()
Get digital object for an information object
public
findByInformationObjectId(int $informationObjectId) : object|null
Parameters
- $informationObjectId : int
Return values
object|nullfindBySlug()
Get digital object by slug
public
findBySlug(string $slug) : object|null
Parameters
- $slug : string
Return values
object|nullgetChildByUsageId()
Get child digital object by usage ID
public
getChildByUsageId(int $parentId, int $usageId) : object|null
Parameters
- $parentId : int
- $usageId : int
Return values
object|nullgetDerivatives()
Get derivatives (thumbnail, reference) for a digital object
public
getDerivatives(int $parentId) : array<string|int, mixed>
Parameters
- $parentId : int
Return values
array<string|int, mixed>getMediaTypeIds()
Get media type ID constants
public
static getMediaTypeIds() : array<string|int, mixed>
Return values
array<string|int, mixed>getMediaTypeName()
Get media type name
public
getMediaTypeName(int|null $mediaTypeId) : string
Parameters
- $mediaTypeId : int|null
Return values
stringgetParentObject()
Get parent object for a digital object
public
getParentObject(int $digitalObjectId) : object|null
Parameters
- $digitalObjectId : int
Return values
object|nullgetParentObjectByObjectId()
Get parent object by object_id field
public
getParentObjectByObjectId(int $objectId) : object|null
Parameters
- $objectId : int
Return values
object|nullgetPropertyValue()
Get property value for a digital object
public
getPropertyValue(int $objectId, string $name) : string|null
Parameters
- $objectId : int
- $name : string
Return values
string|nullgetUsageIds()
Get usage ID constants
public
static getUsageIds() : array<string|int, mixed>
Return values
array<string|int, mixed>getUsageTypeName()
Get usage type name
public
getUsageTypeName(int $usageId) : string
Parameters
- $usageId : int
Return values
stringhasDigitalObject()
Check if digital object exists for information object
public
hasDigitalObject(int $informationObjectId) : bool
Parameters
- $informationObjectId : int
Return values
boolsaveProperty()
Save property for a digital object
public
saveProperty(int $objectId, string $name, string|null $value) : void
Parameters
- $objectId : int
- $name : string
- $value : string|null
update()
Update digital object
public
update(int $digitalObjectId, array<string|int, mixed> $data) : bool
Parameters
- $digitalObjectId : int
- $data : array<string|int, mixed>