StandaloneInformationObjectWriteService
in package
implements
InformationObjectWriteServiceInterface
uses
EntityWriteTrait
Standalone information object write service using Laravel Query Builder only.
Clean implementation without Propel references or class_exists checks. Handles the AtoM entity inheritance chain: object -> information_object -> information_object_i18n
Information objects have 18 i18n fields.
Table of Contents
Interfaces
- InformationObjectWriteServiceInterface
- Contract for information object write operations.
Methods
- createInformationObject() : int
- Create an information object with the given data. Returns the new ID.
- newInformationObject() : object
- Create a new, empty information object instance.
- saveInformationObject() : int
- Save an information object with properties already set (Propel mode).
- updateInformationObject() : void
- Update an existing information object.
Methods
createInformationObject()
Create an information object with the given data. Returns the new ID.
public
createInformationObject(array<string|int, mixed> $data[, string $culture = 'en' ]) : int
Handles the AtoM entity inheritance: INSERT object -> INSERT information_object -> INSERT information_object_i18n.
Parameters
- $data : array<string|int, mixed>
-
Column => value pairs
- $culture : string = 'en'
-
Culture code (e.g., 'en')
Return values
int —The new information_object.id
newInformationObject()
Create a new, empty information object instance.
public
newInformationObject() : object
In Propel mode, returns new QubitInformationObject(). In standalone mode, returns a stdClass with matching properties.
Return values
object —The new information object instance
saveInformationObject()
Save an information object with properties already set (Propel mode).
public
saveInformationObject(object $informationObject) : int
In Propel mode, calls $io->save(). In standalone mode, extracts properties and does DB inserts.
Parameters
- $informationObject : object
-
The IO instance (QubitInformationObject or stdClass)
Return values
int —The information object ID
updateInformationObject()
Update an existing information object.
public
updateInformationObject(int $id, array<string|int, mixed> $data[, string $culture = 'en' ]) : void
Parameters
- $id : int
-
Information object ID
- $data : array<string|int, mixed>
-
Column => value pairs to update
- $culture : string = 'en'
-
Culture code for i18n attributes