2013-11-20 21:52:14 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class EchoMentionFormatter extends EchoCommentFormatter {
|
|
|
|
/**
|
|
|
|
* {@inheritDoc}
|
|
|
|
*/
|
|
|
|
protected function applyChangeBeforeFormatting( EchoEvent $event, User $user, $type ) {
|
|
|
|
parent::applyChangeBeforeFormatting( $event, $user, $type );
|
|
|
|
|
|
|
|
// If we can't find a section title for the mention,
|
|
|
|
// fall back to `notification-mention-nosection`.
|
|
|
|
if ( !$this->getSectionTitle( $event, $user ) ) {
|
|
|
|
$this->title = array(
|
|
|
|
'message' => 'notification-mention-nosection',
|
2015-12-04 21:41:41 +00:00
|
|
|
'params' => array( 'agent', 'main-title-text', 'title', 'user' )
|
2013-11-20 21:52:14 +00:00
|
|
|
);
|
|
|
|
$this->email['batch-body'] = array(
|
|
|
|
'message' => 'notification-mention-nosection-email-batch-body',
|
2015-12-04 21:41:41 +00:00
|
|
|
'params' => array( 'agent', 'main-title-text', 'user' )
|
2013-11-20 21:52:14 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|