Heratio Framework API Reference

StandaloneDonorWriteService
in package
implements DonorWriteServiceInterface uses EntityWriteTrait

Standalone donor write service using Laravel Query Builder only.

Donor extends Actor in AtoM's entity hierarchy: object -> actor -> actor_i18n -> donor

The donor table only has an id column (FK to actor.id). All name/description fields live in actor_i18n.

Table of Contents

Interfaces

DonorWriteServiceInterface
Contract for donor write operations.

Methods

createDonor()  : int
Create a new donor. Returns the new ID.
deleteDonor()  : void
Delete a donor.
newDonor()  : object
Create a new, empty donor object for form binding.
updateDonor()  : void
Update an existing donor.

Methods

createDonor()

Create a new donor. Returns the new ID.

public createDonor(array<string|int, mixed> $data[, string $culture = 'en' ]) : int

Handles the entity inheritance: INSERT object -> INSERT actor -> INSERT actor_i18n -> INSERT donor

Parameters
$data : array<string|int, mixed>

Donor data (authorized_form_of_name, etc.)

$culture : string = 'en'

Culture code (e.g., 'en')

Return values
int

The new donor.id

updateDonor()

Update an existing donor.

public updateDonor(int $id, array<string|int, mixed> $data[, string $culture = 'en' ]) : void
Parameters
$id : int

Donor ID

$data : array<string|int, mixed>

Column => value pairs to update

$culture : string = 'en'

Culture code for i18n attributes


        
On this page

Search results