コード例 #1
0
 static function fetchByUserID($userID, $approveID, $approveStatus, $hash = false, $asObject = true)
 {
     $cond = array('user_id' => $userID, 'approve_id' => $approveID);
     if ($approveStatus !== false) {
         $cond['approve_role'] = $approveStatus;
     }
     if ($hash !== false) {
         $cond['hash'] = $hash;
     }
     return eZPersistentObject::fetchObject(eZXApproveStatusUserLink::definition(), null, $cond, $asObject);
 }
コード例 #2
0
 function removeUser($linkID, $hash = false)
 {
     $condArray = array('id' => $linkID);
     if ($hash !== false) {
         $condArray['hash'] = $hash;
     }
     eZPersistentObject::removeObject(eZXApproveStatusUserLink::definition(), $condArray);
 }