mediawiki-extensions-Echo/includes/formatters/EchoForeignPresentationModel.php
Roan Kattouw 3c543215aa Use globe icon for cross-wiki bundle
Bug: T123757
Change-Id: Ib97c0abb43aacba19e6b8d8a329c836e332927a2
2016-01-15 16:43:14 -08:00

29 lines
590 B
PHP

<?php
class EchoForeignPresentationModel extends EchoEventPresentationModel {
public function getIconType() {
return 'global';
}
public function getPrimaryLink() {
return false;
}
protected function getHeaderMessageKey() {
$data = $this->event->getExtra();
$section = $data['section'];
return "notification-header-{$this->type}-{$section}";
}
public function getHeaderMessage() {
$msg = parent::getHeaderMessage();
$data = $this->event->getExtra();
$msg->params( reset( $data['wikis'] ) );
$msg->numParams( count( $data['wikis'] ) - 1 );
return $msg;
}
}