BxPostsFormsEntryHelper.php 982 B

12345678910111213141516171819202122232425262728293031323334
  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 Posts Posts
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Entry forms helper functions
  13. */
  14. class BxPostsFormsEntryHelper extends BxBaseModTextFormsEntryHelper
  15. {
  16. public function __construct($oModule)
  17. {
  18. parent::__construct($oModule);
  19. }
  20. protected function _alertAfterAdd($aContentInfo)
  21. {
  22. $CNF = &$this->_oModule->_oConfig->CNF;
  23. $aParams = array('object_author_id' => $aContentInfo[$CNF['FIELD_AUTHOR']]);
  24. if(isset($aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]))
  25. $aParams['privacy_view'] = $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']];
  26. bx_alert($this->_oModule->getName(), ($aContentInfo[$CNF['FIELD_STATUS']] == 'awaiting' ? 'scheduled' : 'added'), $aContentInfo[$CNF['FIELD_ID']], $aContentInfo[$CNF['FIELD_AUTHOR']], $aParams);
  27. }
  28. }
  29. /** @} */