mediawiki-extensions-Echo/includes/formatters/EditThresholdPresentationModel.php
Matthew Flaschen 07c962e82f thank-you-edit: canRender for deleted page and extra fix
Don't try to render if page was deleted, and fix 'extra' parameter
(was breaking message key and thus rendering)

Bug: T129641
Change-Id: I5d0fdfd3921427993211969eb5793f8e9e7667a8
2016-03-11 13:59:27 -05:00

24 lines
582 B
PHP

<?php
class EchoEditThresholdPresentationModel extends EchoEventPresentationModel {
public function getIconType() {
return 'edit';
}
public function getHeaderMessageKey() {
return 'notification-header-thank-you-' . $this->event->getExtraParam( 'editCount' ) . '-edit';
}
public function getPrimaryLink() {
return array(
'url' => $this->event->getTitle()->getLocalURL(),
'label' => $this->msg( 'notification-link-thank-you-edit', $this->getViewingUserForGender() )->text()
);
}
public function canRender() {
return $this->event->getTitle() !== null;
}
}