public function addComments($num, $values, $order_by = 0)
 {
     $options = array('referenced_relation' => 'loans', 'record_id' => $this->getObject()->getId());
     $options = array_merge($values, $options);
     $this->attachEmbedRecord('Comments', new CommentsSubForm(DarwinTable::newObjectFromArray('Comments', $options)), $num);
 }
 public function addAuthors($num, $values, $order_by = 0)
 {
     $options = array('referenced_relation' => 'bibliography', 'people_type' => 'author', 'people_ref' => $values['people_ref'], 'order_by' => $order_by, 'record_id' => $this->getObject()->getId());
     $this->attachEmbedRecord('Authors', new PeopleAssociationsForm(DarwinTable::newObjectFromArray('CataloguePeople', $options)), $num);
 }
 public function addRelatedFiles($num, $values, $order_by = 0)
 {
     $options = array('referenced_relation' => 'collection_maintenance', 'record_id' => $this->getObject()->getId());
     $options = array_merge($values, $options);
     $this->attachEmbedRecord('RelatedFiles', new MultimediaForm(DarwinTable::newObjectFromArray('Multimedia', $options)), $num);
 }