diff options
-rw-r--r-- | muamba.business.inc | 59 | ||||
-rw-r--r-- | muamba.module | 8 |
2 files changed, 65 insertions, 2 deletions
diff --git a/muamba.business.inc b/muamba.business.inc index 59e4bd1..45c192e 100644 --- a/muamba.business.inc +++ b/muamba.business.inc @@ -2,7 +2,7 @@ /** * @file - * Business logic handling functions for Muamba. + * Business logic for Muamba. */ /** @@ -120,5 +120,60 @@ function muamba_release($nid, $uid) { * * @todo */ -function muamba_get_requests($nid, $type = 'sent') { +function muamba_get_transactions($uid, $type = 'sent', $status = MUAMBA_REQUESTED) { + $uid = (int) $uid; + + if ($type = 'sent') { + // TODO + $query + ->condition('m.uid', $uid, '=') + ->condition('m.status', $status, '='); + } + else { + // TODO + } + + return $query->execute(); +} + +/** + * Transaction management page. + */ +function muamba() { +} + +/** + * Accept a transaction request. + * + * @param $mid + * Transaction id. + */ +function muamba_accept($mid) { +} + +/** + * Reject a transaction request. + * + * @param $mid + * Transaction id. + */ +function muamba_reject($mid) { +} + +/** + * Release a transaction. + * + * @param $mid + * Transaction id. + */ +function muamba_release($mid) { +} + +/** + * Return an item. + * + * @param $mid + * Transaction id. + */ +function muamba_return($mid) { } diff --git a/muamba.module b/muamba.module index 445b0c3..f88e00b 100644 --- a/muamba.module +++ b/muamba.module @@ -31,6 +31,14 @@ function muamba_permission() { * Implements hook_menu() */ function muamba_menu() { + $items['muamba'] = array( + 'title' => 'My items', + 'page callback' => 'muamba', + 'access arguments' => array(), + 'type' => MENU_SUGGESTED_ITEM, + 'file' => 'muamba.business.inc', + ); + $items['muamba/request'] = array( 'title' => 'Request an item', 'page callback' => 'muamba_request', |