BxChartsAlertsResponse.php 995 B

12345678910111213141516171819202122232425262728
  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 Charts Charts
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxChartsAlertsResponse extends BxDolAlertsResponse
  12. {
  13. public function __construct()
  14. {
  15. parent::__construct();
  16. }
  17. public function response($oAlert)
  18. {
  19. if (isset($oAlert->aExtras['category']) && isset($oAlert->aExtras['category']['type_name']) && isset($oAlert->aExtras['category']['type_group']) && $oAlert->aExtras['category']['type_name'] == 'bx_charts' && $oAlert->aExtras['category']['type_group'] == 'modules'){
  20. $oModule = BxDolModule::getInstance('bx_charts');
  21. BxDolCronQuery::getInstance()->addTransientJobClass('bx_charts_cron_transient', 'BxChartsCron', "modules/" . $oModule->_oConfig->getDirectory() . 'classes/' . $oModule->_oConfig->getClassPrefix() . 'Cron.php');
  22. }
  23. }
  24. }
  25. /** @} */