Example #1
0
 function createRecords($obj)
 {
     $createRecords = createRecords($obj);
     return $createRecords;
 }
Example #2
0
function recordObject($irn)
{
    $mySession = IMuConnect();
    $terms = new IMuTerms();
    $cat = new IMuModule('ecatalogue', $mySession);
    $columns = array('irn', 'Creator=CreCreatorRef_tab.(Name=NamFullName)', 'Role=CreRole_tab', 'AccNo=TitAccessionNo', 'Medium=PhyMediumComments', 'Title=TitMainTitle', 'Year=CreDateCreated', 'Location=LocCurrentLocationRef.(LocLocationName,LocBarcode)', 'Children=<ecatalogue:AssParentObjectRef>.(irn, AccNo=TitAccessionNo, Title=TitMainTitle, Location=LocCurrentLocationRef.(LocLocationName, LocBarcode), TitBarcode)', 'MesType=MesMeasurementType_tab', 'H=MesTotalInchFrac_tab', 'W=MesTotWidthInchFrac_tab', 'D=MesTotDepthInchFrac_tab', 'Barcode=TitBarcode', 'image.resource{height:300,source:master}', 'NotesA=ConHandlingInstructions', 'NotesB=InsInstallationNotes');
    $terms->add('irn', trim($irn));
    $start = 0;
    $number = 100;
    try {
        $hits = $cat->findTerms($terms);
        $result = $cat->fetch('start', $start, $number, $columns);
        $result = formatResults($result);
        createRecords($result);
        return $result;
    } catch (Exception $e) {
        throwError($e);
    }
    return null;
}