Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F552526
FundInitiativeEditor.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
FundInitiativeEditor.php
View Options
<?php
final
class
FundInitiativeEditor
extends
PhabricatorApplicationTransactionEditor
{
public
function
getEditorApplicationClass
()
{
return
PhabricatorFundApplication
::
class
;
}
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Fund Initiatives'
);
}
public
function
getCreateObjectTitle
(
$author
,
$object
)
{
return
pht
(
'%s created this initiative.'
,
$author
);
}
public
function
getCreateObjectTitleForFeed
(
$author
,
$object
)
{
return
pht
(
'%s created %s.'
,
$author
,
$object
);
}
public
function
getTransactionTypes
()
{
$types
=
parent
::
getTransactionTypes
();
$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
(
FundInitiativeTransaction
::
MAILTAG_BACKER
=>
pht
(
'Someone backs an initiative.'
),
FundInitiativeTransaction
::
MAILTAG_STATUS
=>
pht
(
"An initiative's status changes."
),
FundInitiativeTransaction
::
MAILTAG_OTHER
=>
pht
(
'Other initiative activity not listed above occurs.'
),
);
}
protected
function
buildMailTemplate
(
PhabricatorLiskDAO
$object
)
{
$monogram
=
$object
->
getMonogram
();
$name
=
$object
->
getName
();
return
id
(
new
PhabricatorMetaMTAMail
())
->
setSubject
(
"{$monogram}: {$name}"
);
}
protected
function
buildMailBody
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
$body
=
parent
::
buildMailBody
(
$object
,
$xactions
);
$body
->
addLinkSection
(
pht
(
'INITIATIVE DETAIL'
),
PhabricatorEnv
::
getProductionURI
(
'/'
.
$object
->
getMonogram
()));
return
$body
;
}
protected
function
getMailTo
(
PhabricatorLiskDAO
$object
)
{
return
array
(
$object
->
getOwnerPHID
());
}
protected
function
getMailSubjectPrefix
()
{
return
'Fund'
;
}
protected
function
buildReplyHandler
(
PhabricatorLiskDAO
$object
)
{
return
id
(
new
FundInitiativeReplyHandler
())
->
setMailReceiver
(
$object
);
}
protected
function
shouldPublishFeedStory
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
return
true
;
}
protected
function
supportsSearch
()
{
return
true
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 4:30 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
120606
Default Alt Text
FundInitiativeEditor.php (2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment