Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98094047
PhabricatorCountdownEditor.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jan 9, 17:28
Size
2 KB
Mime Type
text/x-php
Expires
Sat, Jan 11, 17:28 (2 d)
Engine
blob
Format
Raw Data
Handle
23505236
Attached To
rPH Phabricator
PhabricatorCountdownEditor.php
View Options
<?php
final
class
PhabricatorCountdownEditor
extends
PhabricatorApplicationTransactionEditor
{
public
function
getEditorApplicationClass
()
{
return
'PhabricatorCountdownApplication'
;
}
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Countdown'
);
}
public
function
getTransactionTypes
()
{
$types
=
parent
::
getTransactionTypes
();
$types
[]
=
PhabricatorTransactions
::
TYPE_EDGE
;
$types
[]
=
PhabricatorTransactions
::
TYPE_SPACE
;
$types
[]
=
PhabricatorTransactions
::
TYPE_VIEW_POLICY
;
$types
[]
=
PhabricatorTransactions
::
TYPE_EDIT_POLICY
;
$types
[]
=
PhabricatorTransactions
::
TYPE_COMMENT
;
return
$types
;
}
protected
function
shouldSendMail
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
return
true
;
}
public
function
getMailTagsMap
()
{
return
array
(
PhabricatorCountdownTransaction
::
MAILTAG_DETAILS
=>
pht
(
'Someone changes the countdown details.'
),
PhabricatorCountdownTransaction
::
MAILTAG_COMMENT
=>
pht
(
'Someone comments on a countdown.'
),
PhabricatorCountdownTransaction
::
MAILTAG_OTHER
=>
pht
(
'Other countdown activity not listed above occurs.'
),
);
}
protected
function
buildMailTemplate
(
PhabricatorLiskDAO
$object
)
{
$monogram
=
$object
->
getMonogram
();
$name
=
$object
->
getTitle
();
return
id
(
new
PhabricatorMetaMTAMail
())
->
setSubject
(
"{$monogram}: {$name}"
)
->
addHeader
(
'Thread-Topic'
,
$monogram
);
}
protected
function
buildMailBody
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
$body
=
parent
::
buildMailBody
(
$object
,
$xactions
);
$description
=
$object
->
getDescription
();
if
(
strlen
(
$description
))
{
$body
->
addRemarkupSection
(
pht
(
'COUNTDOWN DESCRIPTION'
),
$object
->
getDescription
());
}
$body
->
addLinkSection
(
pht
(
'COUNTDOWN DETAIL'
),
PhabricatorEnv
::
getProductionURI
(
'/'
.
$object
->
getMonogram
()));
return
$body
;
}
protected
function
getMailTo
(
PhabricatorLiskDAO
$object
)
{
return
array
(
$object
->
getAuthorPHID
(),
$this
->
requireActor
()->
getPHID
(),
);
}
protected
function
getMailSubjectPrefix
()
{
return
'[Countdown]'
;
}
protected
function
buildReplyHandler
(
PhabricatorLiskDAO
$object
)
{
return
id
(
new
PhabricatorCountdownReplyHandler
())
->
setMailReceiver
(
$object
);
}
protected
function
shouldPublishFeedStory
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
return
true
;
}
protected
function
supportsSearch
()
{
return
true
;
}
}
Event Timeline
Log In to Comment