mediawiki-extensions-Echo/includes/formatters/EmailUserPresentationModel.php
Stephane Bisson 09928f1ed2 Add email body preview to emailuser notification
when the subject line is left with the default
generated value, we take the begining of the
email content to add a preview in the
notification.

Bug: T121831
Change-Id: Ib7c646f6709c7100ef51186f84fe14807d6a211a
2016-02-12 14:50:17 -05:00

22 lines
479 B
PHP

<?php
class EchoEmailUserPresentationModel extends EchoEventPresentationModel {
public function getIconType() {
return 'emailuser';
}
public function getPrimaryLink() {
return false;
}
public function getSecondaryLinks() {
return array( $this->getAgentLink() );
}
public function getBodyMessage() {
$preview = $this->event->getExtraParam( 'preview' );
return $preview ? $this->msg( 'notification-body-emailuser' )->plaintextParams( $preview ) : false;
}
}