Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F982945
PonderMentionMail.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PonderMentionMail.php
View Options
<?php
final
class
PonderMentionMail
extends
PonderMail
{
public
function
__construct
(
PonderQuestion
$question
,
$target
,
PhabricatorUser
$actor
)
{
$this
->
setQuestion
(
$question
);
$this
->
setTarget
(
$target
);
$this
->
setActorHandle
(
$actor
);
}
protected
function
renderVaryPrefix
()
{
return
"[Mentioned]"
;
}
protected
function
renderBody
()
{
$question
=
$this
->
getQuestion
();
$target
=
$this
->
getTarget
();
$actor
=
$this
->
getActorName
();
$name
=
$question
->
getTitle
();
$targetkind
=
"somewhere"
;
if
(
$target
instanceof
PonderQuestion
)
{
$targetkind
=
"in a question"
;
}
else
if
(
$target
instanceof
PonderAnswer
)
{
$targetkind
=
"in an answer"
;
}
else
if
(
$target
instanceof
PonderComment
)
{
$targetkind
=
"in a comment"
;
}
$body
=
array
();
$body
[]
=
"{$actor} mentioned you {$targetkind}."
;
$body
[]
=
null
;
$content
=
$target
->
getContent
();
if
(
strlen
(
$content
))
{
$body
[]
=
$this
->
formatText
(
$content
);
$body
[]
=
null
;
}
return
implode
(
"
\n
"
,
$body
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 2:00 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
236489
Default Alt Text
PonderMentionMail.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment