heartbeatstreamconfig.inc 2.6 KB

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