1
0

BxBasePrivacy.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 TridentCore Trident Core
  7. * @{
  8. */
  9. /**
  10. * Privacy representation.
  11. * @see BxDolPrivacy
  12. */
  13. class BxBasePrivacy extends BxDolPrivacy
  14. {
  15. protected $_oTemplate;
  16. public function __construct ($aOptions, $oTemplate)
  17. {
  18. parent::__construct ($aOptions);
  19. if ($oTemplate)
  20. $this->_oTemplate = $oTemplate;
  21. else
  22. $this->_oTemplate = BxDolTemplate::getInstance();
  23. }
  24. protected function _addJsCss()
  25. {
  26. /*
  27. $this->_oTemplate->addJs('BxDolGrid.js');
  28. $this->_oTemplate->addCss('grid.css');
  29. */
  30. }
  31. protected function _echoResultJson($a, $isAutoWrapForFormFileSubmit = false)
  32. {
  33. header('Content-type: text/html; charset=utf-8');
  34. $s = json_encode($a);
  35. if ($isAutoWrapForFormFileSubmit && !empty($_FILES))
  36. $s = '<textarea>' . $s . '</textarea>';
  37. echo $s;
  38. }
  39. }
  40. /** @} */