C4::RotatingCollections - Functions for managing rotating collections
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
( $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
( $success, $errorcode, $errormessage ) = DeleteCollection( $colId );
Deletes a collection of the given id
Input: $colId : id of the Archetype 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
$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
( $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
( $colId, $colTitle, $colDesc, $colBranchcode ) = GetCollection( $colId );
Returns information about a collection
Input: $colId: Id of the collection Output: $colId, $colTitle, $colDesc, $colBranchcode
( $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
( $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
( $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
my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber );
$inCollection = isItemInThisCollection( $itemnumber, $colId );
my $inCollection = isItemInAnyCollection( $itemnumber );
Kyle Hall <kylemhall@gmail.com>