<?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;
	}
}

<?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() {
		if ( !$this->event->getTitle() ) {
			return false;
		}
		return array(
			'url' => $this->event->getTitle()->getLocalURL(),
			'label' => $this->msg( 'notification-link-thank-you-edit', $this->getViewingUserForGender() )->text()
		);
	}
}

Make 'Edit threshhold' notif appear regardless of title existence
Make 'Edit threshhold' notif appear regardless of title existence

If a user recieves 'this is your X edit' they should get this notif
regardless of whether the edit they created was deleted. We should
make sure the title is there only for deciding whether or not to
create a link for it; otherwise, the notification will just appear
without a link to the revision.

Change-Id: I00ed4278bb4e15b1e9ddfa2c3af8fad0540fc5f8
