heartbeatstreamconfig.inc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. /**
  3. * @file
  4. * HeartbeatStream Configuration object
  5. * Parameter object given to HeartbeatStreamConfig objects
  6. * to create stream stream of activity objects.
  7. */
  8. /**
  9. * Class HeartbeatStreamConfig
  10. *
  11. * Changeable object with configurations for an activity stream
  12. */
  13. class HeartbeatStreamConfig {
  14. // Class name used.
  15. public $name = '';
  16. // Class to variable for ease of read/write.
  17. public $class = '';
  18. // Real class to load for cloned streams.
  19. public $real_class = '';
  20. // The path to the class.
  21. public $path = '';
  22. // Human readable name.
  23. public $title = '';
  24. // Module where query builder is located.
  25. public $module = '';
  26. // Extra variables.
  27. //TODO variables might be put into config api
  28. public $variables = array();
  29. // Indicates whether this stream has a block display or not.
  30. public $has_block = TRUE;
  31. // Max number of items in block display.
  32. public $block_items_max = 25;
  33. // Number to indicate how a block-pager should be shown.
  34. public $block_show_pager = 0;
  35. // View mode for the block.
  36. public $block_view_mode = 'default';
  37. // Maximum number of items in the page display.
  38. public $page_items_max = 50;
  39. // Boolean to indicate of a page-pager should be shown.
  40. public $page_show_pager = 0;
  41. // Boolean to indicate if the pager is ajax-driven.
  42. public $page_pager_ajax = 0;
  43. // View mode for the page.
  44. public $page_view_mode = 'default';
  45. // Setting for the number of grouped items maximum.
  46. public $show_message_times = 1;
  47. // Setting for the number of grouped items maximum in a grouped message.
  48. public $show_message_times_grouped = 0;
  49. // Denied message templates.
  50. public $messages_denied = array();
  51. // Limit the number of messages by maximum messages to load.
  52. public $num_load_max = 100;
  53. // Limit the timespan to group messages.
  54. public $grouping_seconds = 7200;
  55. // Boolean for to skip the viewing user, defaults to false.
  56. public $skip_active_user = FALSE;
  57. // Timestamp used to poll for newer messages.
  58. public $poll_messages = 0;
  59. // How to notify there are newer messages.
  60. public $poll_messages_type = 0;
  61. // Stream path is the path to the stream page (optional).
  62. public $stream_path = '';
  63. // Stream user path is the path to a stream on the profile page (optional).
  64. public $stream_profile_path = '';
  65. // Settings variable
  66. public $settings = array();
  67. /**
  68. * Constructor to load the type variable
  69. */
  70. public function __construct() {
  71. //TODO replace variable_get with D8's state system
  72. // $this->grouping_seconds = variable_get('heartbeat_activity_grouping_seconds', 7200);
  73. }
  74. }