artefactual/atom — pull request #59 by mistydemeo (2014-10-10 19:50:03+00:00)
Title: #5094 - Recreate RAD events from EAD on import

This updates the EAD import process to correctly recreate RAD events.

RAD events can have both places and actors associated with them. These places and actors are associated with the *event* and not with the information object itself, which affects how they're displayed in the user interface. AtoM currently doesn't support exporting these to EAD or reimporting them. Prior to 61fb9c63f700a3efd5eccea2557ef09c0155431d, they weren't exported in EAD at all; now they are, with their role intact, but they will be imported as standard authorities instead of in association with their events.

This adds a new `id` attribute to events and to the places and actors associated with those events on export to EAD. On import, any actor or place with an ID will not have a relationship built to the information object and will instead be associated to its associated event.

This required a few extra bits of plumbing to support:

* `QubitInformationObject::setActorByName` and `::setTermRelationByName` now support the new `createRelation` parameter in the `$options` array. If set to false, it overrides the usual logic determining whether a relationship should be created and creates no relationship.
* `QubitInformationObject::setActorByName` and `::setTermRelationByName`, which previously returned void, now return the created actor or term object if one is created. This shouldn't affect existing code.