BxPaymentCommissions.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Payment Payment
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxPaymentCommissions extends BxBaseModPaymentCommissions
  12. {
  13. public function __construct()
  14. {
  15. $this->_sModule = 'bx_payment';
  16. parent::__construct();
  17. }
  18. /**
  19. * @page service Service Calls
  20. * @section bx_payment Payment
  21. * @subsection bx_payment-page_blocks Page Blocks
  22. * @subsubsection bx_payment-get_block_invoices get_block_invoices
  23. *
  24. * @code bx_srv('bx_payment', 'get_block_invoices', [...], 'Details'); @endcode
  25. *
  26. * Get page block with a list of invoices.
  27. *
  28. * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
  29. *
  30. * @see BxPaymentDetails::serviceGetBlockDetails
  31. */
  32. /**
  33. * @ref bx_payment-get_block_invoices "get_block_invoices"
  34. */
  35. public function serviceGetBlockInvoices($iUserId = BX_PAYMENT_EMPTY_ID)
  36. {
  37. if(!$this->_oModule->isLogged())
  38. return MsgBox(_t($this->_sLangsPrefix . 'err_required_login'));
  39. $this->_oModule->setSiteSubmenu('menu_dashboard', 'system', 'dashboard-invoices');
  40. return $this->_oModule->_oTemplate->displayBlockInvoices();
  41. }
  42. }
  43. /** @} */