mediawiki-extensions-Echo/includes/formatters
Kunal Mehta 5e2da7627b Refactor and unify icon URL logic
The logic to get the URL for an icon was duplicated in the
EmailFormatter and BasicFormatter. It is now in the abstract
NotificationFormatter, which EmailFormatter and BasicFormatter now
use.

Changes in logic:
* Throw an exception if an invalid notification type is provided instead
of a PHP notice
* icons using 'url' may have different ltr/rtl icons
* Throw exception if icon is supposed to have different icons for
ltr/rtl, but doesn't, instead of debug logging

The new function is static so it can be used in EmailFormatter as it
does not inherit from NotificationFormatter.

Bug: T60726
Change-Id: Ia3c01c35f58eed8cc2c039249ab1ec1a80a8abbb
2015-08-06 04:17:14 +00:00
..
BasicFormatter.php Refactor and unify icon URL logic 2015-08-06 04:17:14 +00:00
CommentFormatter.php Move all PHP code into includes/ 2015-06-07 18:54:14 -07:00
EditFormatter.php Move all PHP code into includes/ 2015-06-07 18:54:14 -07:00
EditUserTalkFormatter.php Move all PHP code into includes/ 2015-06-07 18:54:14 -07:00
MentionFormatter.php Move all PHP code into includes/ 2015-06-07 18:54:14 -07:00
NotificationFormatter.php Refactor and unify icon URL logic 2015-08-06 04:17:14 +00:00
PageLinkFormatter.php Move all PHP code into includes/ 2015-06-07 18:54:14 -07:00
UserRightsFormatter.php Move all PHP code into includes/ 2015-06-07 18:54:14 -07:00