mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 09:26:05 +00:00
09928f1ed2
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
22 lines
479 B
PHP
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;
|
|
}
|
|
}
|