BxBaseModPaymentGridProviders.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 BasePayment Base classes for Payment like modules
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxBaseModPaymentGridProviders extends BxTemplGrid
  12. {
  13. protected $_sModule;
  14. protected $_oModule;
  15. public function __construct ($aOptions, $oTemplate = false)
  16. {
  17. parent::__construct ($aOptions, $oTemplate);
  18. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  19. }
  20. protected function _getCellForVisitor($mixedValue, $sKey, $aField, $aRow)
  21. {
  22. return parent::_getCellDefault($this->_getCellValue($mixedValue), $sKey, $aField, $aRow);
  23. }
  24. protected function _getCellForSingle($mixedValue, $sKey, $aField, $aRow)
  25. {
  26. return parent::_getCellDefault($this->_getCellValue($mixedValue), $sKey, $aField, $aRow);
  27. }
  28. protected function _getCellForRecurring($mixedValue, $sKey, $aField, $aRow)
  29. {
  30. return parent::_getCellDefault($this->_getCellValue($mixedValue), $sKey, $aField, $aRow);
  31. }
  32. protected function _getCellValue($mixedValue)
  33. {
  34. return _t((int)$mixedValue != 0 ? '_Yes' : '_No');
  35. }
  36. }
  37. /** @} */