mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-30 18:45:07 +00:00
24caf50ff6
To allow individual notifications to be marked as read/unread or moderated, bundles are created by grouping associated notifications when they are fetched for display instead of when they are created. From a product perspective, this change doesn't introduce moderation or expandable bundles but it counts each individual notifications. For instance, the bundled notification "3 new topics on PageA" now counts as 3 notifications. Bug: T93673 Bug: T120153 Change-Id: Iacd098573efd92bb1e3fcd7da4cd40cea9522f15
31 lines
624 B
PHP
31 lines
624 B
PHP
<?php
|
|
|
|
/**
|
|
* Interface Bundleable
|
|
*
|
|
* Indicates that an object can be bundled.
|
|
*/
|
|
interface Bundleable {
|
|
|
|
/**
|
|
* @return boolean Whether this object can be bundled.
|
|
*/
|
|
public function canBeBundled();
|
|
|
|
/**
|
|
* @return string objects with the same bundling key can be bundled together
|
|
*/
|
|
public function getBundlingKey();
|
|
|
|
/**
|
|
* @param Bundleable[] $bundleables other object that have been bundled with this one
|
|
*/
|
|
public function setBundledElements( $bundleables );
|
|
|
|
/**
|
|
* @return mixed the key by which this object should be sorted during the bundling process
|
|
*/
|
|
public function getSortingKey();
|
|
}
|
|
|