ImportWriteServiceInterface
in
Contract for import write operations.
Covers: creating information objects, actors, terms, events, notes, properties, and slugs during CSV/bulk import operations.
The PropelAdapter wraps Qubit* classes for Symfony mode. Falls back to Laravel DB for standalone Heratio mode, handling the AtoM entity inheritance chain: object -> information_object -> information_object_i18n object -> actor -> actor_i18n object -> term -> term_i18n
Table of Contents
Methods
- createEvent() : int
- Create an event linked to an object.
- createInformationObject() : int
- Create a new information object with i18n attributes.
- createNote() : int
- Create a note on an object.
- createOrFindActor() : int
- Create or find an actor by authorized form of name.
- createOrFindTerm() : int
- Create or find a term by name within a taxonomy.
- createProperty() : int
- Create a property on an object.
- createRelation() : int
- Create a relation between two objects.
- createSlug() : void
- Create a slug for an object.
Methods
createEvent()
Create an event linked to an object.
public
createEvent(int $objectId, array<string|int, mixed> $attributes[, string $culture = 'en' ]) : int
Parameters
- $objectId : int
-
Object (information_object) ID
- $attributes : array<string|int, mixed>
-
Event attributes (actor_id, type_id, date, start_date, end_date)
- $culture : string = 'en'
-
Culture code
Return values
int —The new event.id
createInformationObject()
Create a new information object with i18n attributes.
public
createInformationObject(array<string|int, mixed> $attributes, array<string|int, mixed> $i18nAttributes[, string $culture = 'en' ]) : int
Handles the inheritance chain: object -> information_object -> information_object_i18n.
Parameters
- $attributes : array<string|int, mixed>
-
Core attributes (parent_id, repository_id, level_of_description_id, etc.)
- $i18nAttributes : array<string|int, mixed>
-
Localized attributes (title, scope_and_content, etc.)
- $culture : string = 'en'
-
Culture code
Return values
int —The new information_object.id
createNote()
Create a note on an object.
public
createNote(int $objectId, int $typeId, string $content[, string $culture = 'en' ]) : int
Parameters
- $objectId : int
-
Object ID
- $typeId : int
-
Note type term ID
- $content : string
-
Note content
- $culture : string = 'en'
-
Culture code
Return values
int —The new note.id
createOrFindActor()
Create or find an actor by authorized form of name.
public
createOrFindActor(string $name[, string $culture = 'en' ]) : int
Parameters
- $name : string
-
Actor name (authorized form)
- $culture : string = 'en'
-
Culture code
Return values
int —The actor.id (existing or newly created)
createOrFindTerm()
Create or find a term by name within a taxonomy.
public
createOrFindTerm(int $taxonomyId, string $name[, string $culture = 'en' ]) : int
Parameters
- $taxonomyId : int
-
Taxonomy ID
- $name : string
-
Term name
- $culture : string = 'en'
-
Culture code
Return values
int —The term.id (existing or newly created)
createProperty()
Create a property on an object.
public
createProperty(int $objectId, string $name, string $value[, string $culture = 'en' ]) : int
Parameters
- $objectId : int
-
Object ID
- $name : string
-
Property name
- $value : string
-
Property value
- $culture : string = 'en'
-
Culture code
Return values
int —The new property.id
createRelation()
Create a relation between two objects.
public
createRelation(int $subjectId, int $objectId, int $typeId) : int
Parameters
- $subjectId : int
-
Subject object ID
- $objectId : int
-
Related object ID
- $typeId : int
-
Relation type term ID
Return values
int —The new relation.id
createSlug()
Create a slug for an object.
public
createSlug(int $objectId, string $slug) : void
Parameters
- $objectId : int
-
Object ID
- $slug : string
-
URL slug