<<

NAME

C4::RotatingCollections - Functions for managing rotating collections

FUNCTIONS

CreateCollection ( $success, $errorcode, $errormessage ) = CreateCollection( $title, $description ); Creates a new collection
 Input:
   $title: short description of the club or service
   $description: long description of the club or service

 Output:
   $success: 1 if all database operations were successful, 0 otherwise
   $errorCode: Code for reason of failure, good for translating errors in templates
   $errorMessage: English description of error
UpdateCollection ( $success, $errorcode, $errormessage ) = UpdateCollection( $colId, $title, $description ); Updates a collection
 Input:
   $colId: id of the collection to be updated
   $title: short description of the club or service
   $description: long description of the club or service

 Output:
   $success: 1 if all database operations were successful, 0 otherwise
   $errorCode: Code for reason of failure, good for translating errors in templates
   $errorMessage: English description of error
DeleteCollection ( $success, $errorcode, $errormessage ) = DeleteCollection( $colId ); Deletes a collection of the given id
 Input:
   $colId : id of the Archtype to be deleted

 Output:
   $success: 1 if all database operations were successful, 0 otherwise
   $errorCode: Code for reason of failure, good for translating errors in templates
   $errorMessage: English description of error
GetCollections $collections = GetCollections(); Returns data about all collections
 Output:
  On Success:
   $results: Reference to an array of associated arrays
  On Failure:
   $errorCode: Code for reason of failure, good for translating errors in templates
   $errorMessage: English description of error
GetItemsInCollection ( $results, $success, $errorcode, $errormessage ) = GetItemsInCollection( $colId ); Returns information about the items in the given collection
 Input:
   $colId: The id of the collection

 Output:
   $results: Reference to an array of associated arrays
   $success: 1 if all database operations were successful, 0 otherwise
   $errorCode: Code for reason of failure, good for translating errors in templates
   $errorMessage: English description of error
GetCollection ( $colId, $colTitle, $colDesc, $colBranchcode ) = GetCollection( $colId ); Returns information about a collection
 Input:
   $colId: Id of the collection
 Output:
   $colId, $colTitle, $colDesc, $colBranchcode
AddItemToCollection ( $success, $errorcode, $errormessage ) = AddItemToCollection( $colId, $itemnumber ); Adds an item to a rotating collection.
 Input:
   $colId: Collection to add the item to.
   $itemnumber: Item to be added to the collection
 Output:
   $success: 1 if all database operations were successful, 0 otherwise
   $errorCode: Code for reason of failure, good for translating errors in templates
   $errorMessage: English description of error
RemoveItemFromCollection ( $success, $errorcode, $errormessage ) = RemoveItemFromCollection( $colId, $itemnumber ); Removes an item to a collection
 Input:
   $colId: Collection to add the item to.
   $itemnumber: Item to be removed from collection

 Output:
   $success: 1 if all database operations were successful, 0 otherwise
   $errorCode: Code for reason of failure, good for translating errors in templates
   $errorMessage: English description of error
TransferCollection ( $success, $errorcode, $errormessage ) = TransferCollection( $colId, $colBranchcode ); Transfers a collection to another branch
 Input:
   $colId: id of the collection to be updated
   $colBranchcode: branch where collection is moving to

 Output:
   $success: 1 if all database operations were successful, 0 otherwise
   $errorCode: Code for reason of failure, good for translating errors in templates
   $errorMessage: English description of error
GetCollectionItemBranches my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber );
isItemInThisCollection $inCollection = isItemInThisCollection( $itemnumber, $colId );
isItemInAnyCollection $inCollection = isItemInAnyCollection( $itemnumber );

AUTHOR

Kyle Hall <kylemhall@gmail.com>

<<