BxReputationConfig.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 Reputation Reputation
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxReputationConfig extends BxBaseModNotificationsConfig
  12. {
  13. protected $_oDb;
  14. public function __construct($aModule)
  15. {
  16. parent::__construct($aModule);
  17. $this->CNF = [
  18. // database tables
  19. 'TABLE_PROFILES' => $aModule['db_prefix'] . 'profiles',
  20. // database fields
  21. 'FIELD_' => '',
  22. // some params
  23. 'PARAM_' => 'bx_reputation_',
  24. // objects
  25. 'OBJECT_FORM_HANDLER' => 'bx_reputation_handler',
  26. 'OBJECT_FORM_HANDLER_DISPLAY_EDIT' => 'bx_reputation_handler_edit',
  27. 'OBJECT_GRID_MANAGE' => 'bx_reputation_manage',
  28. // some language keys
  29. 'T' => [
  30. 'grid_action_err_perform' => '_bx_reputation_grid_action_err_perform',
  31. 'popup_title_handler_edit' => '_bx_reputation_popup_title_handler_edit',
  32. 'filter_item_select_one_filter1' => '_bx_reputation_grid_filter_item_title_select_one_filter1',
  33. 'err_cannot_perform' => '_bx_reputation_err_cannot_perform',
  34. ]
  35. ];
  36. $this->_aJsClasses = [
  37. 'manage' => 'BxReputationManage',
  38. ];
  39. $this->_aJsObjects = [
  40. 'manage' => 'oBxReputationManage',
  41. ];
  42. $sHtmlPrefix = str_replace('_', '-', $this->_sName);
  43. $this->_aHtmlIds = [
  44. 'handler_popup' => $sHtmlPrefix . '-handler-popup',
  45. ];
  46. $this->_aHandlerFields = ['group', 'type', 'alert_unit', 'alert_action', 'points_active', 'points_passive'];
  47. $this->_aHandlerDescriptor = [];
  48. $this->_sHandlersMethod = 'get_reputation_data';
  49. }
  50. public function init(&$oDb)
  51. {
  52. parent::init($oDb);
  53. }
  54. }
  55. /** @} */