mediawiki-extensions-Echo/includes/formatters/EchoForeignPresentationModel.php
Roan Kattouw 63eef35026 Cross-wiki notifications integration
Bug: T121829
Change-Id: Ifb52ad5605a56d27e5951479326689242a49430e
2016-01-13 09:47:57 -08:00

29 lines
588 B
PHP

<?php
class EchoForeignPresentationModel extends EchoEventPresentationModel {
public function getIconType() {
return 'site';
}
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;
}
}