Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93947709
PhabricatorOwnersPackageTransactionEditor.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
Mon, Dec 2, 18:27
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 4, 18:27 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22727709
Attached To
rPH Phabricator
PhabricatorOwnersPackageTransactionEditor.php
View Options
<?php
final
class
PhabricatorOwnersPackageTransactionEditor
extends
PhabricatorApplicationTransactionEditor
{
public
function
getEditorApplicationClass
()
{
return
'PhabricatorOwnersApplication'
;
}
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Owners Packages'
);
}
public
function
getTransactionTypes
()
{
$types
=
parent
::
getTransactionTypes
();
$types
[]
=
PhabricatorTransactions
::
TYPE_VIEW_POLICY
;
$types
[]
=
PhabricatorTransactions
::
TYPE_EDIT_POLICY
;
return
$types
;
}
protected
function
shouldSendMail
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
return
true
;
}
protected
function
getMailSubjectPrefix
()
{
return
PhabricatorEnv
::
getEnvConfig
(
'metamta.package.subject-prefix'
);
}
protected
function
getMailTo
(
PhabricatorLiskDAO
$object
)
{
return
array
(
$this
->
requireActor
()->
getPHID
(),
);
}
protected
function
getMailCC
(
PhabricatorLiskDAO
$object
)
{
return
mpull
(
$object
->
getOwners
(),
'getUserPHID'
);
}
protected
function
buildReplyHandler
(
PhabricatorLiskDAO
$object
)
{
return
id
(
new
OwnersPackageReplyHandler
())
->
setMailReceiver
(
$object
);
}
protected
function
buildMailTemplate
(
PhabricatorLiskDAO
$object
)
{
$id
=
$object
->
getID
();
$name
=
$object
->
getName
();
return
id
(
new
PhabricatorMetaMTAMail
())
->
setSubject
(
$name
)
->
addHeader
(
'Thread-Topic'
,
$object
->
getPHID
());
}
protected
function
buildMailBody
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
$body
=
parent
::
buildMailBody
(
$object
,
$xactions
);
$detail_uri
=
PhabricatorEnv
::
getProductionURI
(
$object
->
getURI
());
$body
->
addLinkSection
(
pht
(
'PACKAGE DETAIL'
),
$detail_uri
);
return
$body
;
}
protected
function
supportsSearch
()
{
return
true
;
}
}
Event Timeline
Log In to Comment