BxNtfsStudioPage.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 Notifications Notifications
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxNtfsStudioPage extends BxTemplStudioModule
  12. {
  13. protected $_sModule;
  14. protected $_oModule;
  15. function __construct($sModule, $mixedPageName, $sPage = "")
  16. {
  17. $this->_sModule = 'bx_notifications';
  18. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  19. parent::__construct($sModule, $mixedPageName, $sPage);
  20. $this->aMenuItems = array_merge($this->aMenuItems, array(
  21. BX_BASE_MOD_NTFS_DTYPE_SITE => array('name' => BX_BASE_MOD_NTFS_DTYPE_SITE, 'icon' => 'globe', 'title' => '_bx_ntfs_lmi_cpt_site'),
  22. BX_BASE_MOD_NTFS_DTYPE_EMAIL => array('name' => BX_BASE_MOD_NTFS_DTYPE_EMAIL, 'icon' => 'envelope', 'title' => '_bx_ntfs_lmi_cpt_email'),
  23. BX_BASE_MOD_NTFS_DTYPE_PUSH => array('name' => BX_BASE_MOD_NTFS_DTYPE_PUSH, 'icon' => 'bullhorn', 'title' => '_bx_ntfs_lmi_cpt_push')
  24. ));
  25. }
  26. protected function getSite()
  27. {
  28. return $this->_getDeliveryType(BX_BASE_MOD_NTFS_DTYPE_SITE);
  29. }
  30. protected function getEmail()
  31. {
  32. return $this->_getDeliveryType(BX_BASE_MOD_NTFS_DTYPE_EMAIL);
  33. }
  34. protected function getPush()
  35. {
  36. return $this->_getDeliveryType(BX_BASE_MOD_NTFS_DTYPE_PUSH);
  37. }
  38. protected function _getDeliveryType($sDeliveryType)
  39. {
  40. return $this->_oModule->getBlockSettings($sDeliveryType, array(
  41. 'grid' => $this->_oModule->_oConfig->CNF['OBJECT_GRID_SETTINGS_ADMINISTRATION'],
  42. 'template' => BxDolStudioTemplate::getInstance()
  43. ));
  44. }
  45. }
  46. /** @} */