mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-24 16:04:35 +00:00
e7e55d4279
There was no point in letting it extend EchoFlyoutFormatter instead of the base EchoEventFormatter. The only things in EchoFlyoutFormatter are formatModel & getIconURL, both of which aren't being called. Change-Id: I89511530a41976974f4d51d55379a617dfe503ec
18 lines
494 B
PHP
18 lines
494 B
PHP
<?php
|
|
|
|
/**
|
|
* A formatter for the notification flyout popup. Just the bare data needed to
|
|
* render everything client-side.
|
|
*/
|
|
class EchoModelFormatter extends EchoEventFormatter {
|
|
/**
|
|
* @param EchoEventPresentationModel $model
|
|
* @return array
|
|
*/
|
|
protected function formatModel( EchoEventPresentationModel $model ) {
|
|
$data = $model->jsonSerialize();
|
|
$data['iconUrl'] = EchoNotificationFormatter::getIconUrl( $model->getIconType(), $this->language->getDir() );
|
|
return $data;
|
|
}
|
|
}
|