1
0

BxBaseModTemplateConfig.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup BaseTemplate Base classes for template modules
  7. * @ingroup TridentModules
  8. *
  9. * @{
  10. */
  11. bx_import('BxBaseModGeneralConfig');
  12. class BxBaseModTemplateConfig extends BxBaseModGeneralConfig
  13. {
  14. protected $_oDb;
  15. protected $_iLogo;
  16. protected $_sLogoAlt;
  17. protected $_iLogoWidth;
  18. protected $_iLogoHeight;
  19. function __construct($aModule)
  20. {
  21. parent::__construct($aModule);
  22. }
  23. public function init(&$oDb)
  24. {
  25. $this->_oDb = &$oDb;
  26. $sOptionPrefix = $this->getPrefix('option');
  27. $this->_iLogo = (int)$this->_oDb->getParam($sOptionPrefix . 'site_logo');
  28. $this->_sLogoAlt = $this->_oDb->getParam($sOptionPrefix . 'site_logo_alt');
  29. $this->_iLogoWidth = (int)$this->_oDb->getParam($sOptionPrefix . 'site_logo_width');
  30. $this->_iLogoHeight = (int)$this->_oDb->getParam($sOptionPrefix . 'site_logo_height');
  31. }
  32. public function getLogoParams()
  33. {
  34. $sPrefix = $this->getPrefix('option');
  35. return array(
  36. $sPrefix . 'site_logo',
  37. $sPrefix . 'site_logo_alt',
  38. $sPrefix . 'site_logo_width',
  39. $sPrefix . 'site_logo_height'
  40. );
  41. }
  42. public function getLogo()
  43. {
  44. return $this->_iLogo;
  45. }
  46. public function getLogoAlt()
  47. {
  48. return $this->_sLogoAlt;
  49. }
  50. public function getLogoWidth()
  51. {
  52. return $this->_iLogoWidth;
  53. }
  54. public function getLogoHeight()
  55. {
  56. return $this->_iLogoHeight;
  57. }
  58. }
  59. /** @} */