_bWithdraw) return $this->_bIsApi ? [] : echoJson([]); $sAction = 'withdraw_request'; return $this->_performActionWithProfileAmount($sAction); } public function performActionWithdrawCancel() { if(!$this->_bWithdraw) return $this->_bIsApi ? [] : echoJson([]); $sAction = 'withdraw_cancel'; $iId = $this->_getId(); if(!$iId) return $this->_bIsApi ? [] : echoJson([]); $aResult = $this->_oModule->processWithdrawCancel($iId); $aResult = $this->_onPerformAction($aResult); return $this->_bIsApi ? $aResult : echoJson($aResult); } public function getCode($isDisplayHeader = true) { $sResult = parent::getCode($isDisplayHeader); if(!empty($sResult) && $isDisplayHeader) $sResult = $this->_oModule->_oTemplate->getJsCode('withdraw') . $sResult; return $sResult; } protected function _getActionWithdrawRequest($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) { if(!$this->_bWithdraw) return $this->_bIsApi ? [] : ''; return parent::_getActionDefault($sType, $sKey, $a, false, $isDisabled, $aRow); } protected function _getActionWithdrawCancel($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) { if(!$this->_bWithdraw || $aRow['status'] != BX_CREDITS_WITHDRAWAL_STATUS_REQUESTED) return $this->_bIsApi ? [] : ''; return parent::_getActionDefault($sType, $sKey, $a, false, $isDisabled, $aRow); } protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage) { if(empty($this->_iUserId) || $this->_iUserId != bx_get_logged_profile_id()) return []; $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `profile_id`=?", $this->_iUserId); return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage); } } /** @} */