mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/LoginNotify
synced 2024-11-24 23:05:33 +00:00
78de4c6aa2
Change-Id: Ice5ff0bd25c5e2af522965bf8229e64bce70b593
45 lines
900 B
PHP
45 lines
900 B
PHP
<?php
|
|
class LoginNotifyPresentationModel extends EchoEventPresentationModel {
|
|
|
|
/**
|
|
* Show a lock icon, for account security.
|
|
*
|
|
* @return String Name of icon
|
|
*/
|
|
public function getIconType() {
|
|
return 'LoginNotify-lock';
|
|
}
|
|
|
|
/**
|
|
* Nothing really to link to
|
|
*
|
|
* @return boolean false to disable link
|
|
*/
|
|
public function getPrimaryLink() {
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Include the number of attempts in the message
|
|
*
|
|
* (For grep) This uses i18n messages:
|
|
* notification-header-login-fail-known
|
|
* notification-header-login-fail-new
|
|
* notification-header-login-success
|
|
*
|
|
* @return Message
|
|
*/
|
|
public function getHeaderMessage() {
|
|
return parent::getHeaderMessage()->numParams(
|
|
$this->event->getExtraParam( 'count', 0 )
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @todo FIXME Unclear if this is a good idea
|
|
*/
|
|
public function getSecondaryLinks() {
|
|
return [ $this->getAgentLink() ];
|
|
}
|
|
}
|