BxTimelineCmts.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 Timeline Timeline
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxTimelineCmts extends BxTemplCmts
  12. {
  13. protected $_sModule;
  14. protected $_oModule;
  15. function __construct($sSystem, $iId, $iInit = 1)
  16. {
  17. parent::__construct($sSystem, $iId, $iInit);
  18. $this->_sModule = 'bx_timeline';
  19. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  20. $this->_aSystem['trigger_field_privacy_view'] = 'object_privacy_view';
  21. }
  22. public function geModalViewApi()
  23. {
  24. return $this->_sModule;
  25. }
  26. public function onPostAfter($iCmtId, $aDp = [])
  27. {
  28. $CNF = &$this->_oModule->_oConfig->CNF;
  29. $mixedResult = parent::onPostAfter($iCmtId, $aDp);
  30. if($mixedResult !== false)
  31. $this->_oModule->_oDb->updateEvent([$CNF['FIELD_REACTED'] => time()], [$CNF['FIELD_ID'] => $this->getId()]);
  32. return $mixedResult;
  33. }
  34. }
  35. /** @} */