mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-14 19:02:41 +01:00
38 lines
837 B
PHP
38 lines
837 B
PHP
|
<?php
|
||
|
|
||
|
final class PonderCommentMail extends PonderMail {
|
||
|
|
||
|
public function __construct(
|
||
|
PonderQuestion $question,
|
||
|
PonderComment $target,
|
||
|
PhabricatorUser $actor) {
|
||
|
|
||
|
$this->setQuestion($question);
|
||
|
$this->setTarget($target);
|
||
|
$this->setActorHandle($actor);
|
||
|
}
|
||
|
|
||
|
protected function renderVaryPrefix() {
|
||
|
return "[Commented]";
|
||
|
}
|
||
|
|
||
|
protected function renderBody() {
|
||
|
$question = $this->getQuestion();
|
||
|
$target = $this->getTarget();
|
||
|
$actor = $this->getActorName();
|
||
|
$name = $question->getTitle();
|
||
|
|
||
|
$body = array();
|
||
|
$body[] = "{$actor} commented on a question that you are subscribed to.";
|
||
|
$body[] = null;
|
||
|
|
||
|
$content = $target->getContent();
|
||
|
if (strlen($content)) {
|
||
|
$body[] = $this->formatText($content);
|
||
|
$body[] = null;
|
||
|
}
|
||
|
|
||
|
return implode("\n", $body);
|
||
|
}
|
||
|
}
|