Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92688585
PhabricatorMacroEditor.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
Fri, Nov 22, 19:13
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Nov 24, 19:13 (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
22486830
Attached To
rPH Phabricator
PhabricatorMacroEditor.php
View Options
<?php
final
class
PhabricatorMacroEditor
extends
PhabricatorApplicationTransactionEditor
{
public
function
getEditorApplicationClass
()
{
return
'PhabricatorMacroApplication'
;
}
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Macros'
);
}
public
function
getCreateObjectTitle
(
$author
,
$object
)
{
return
pht
(
'%s created this macro.'
,
$author
);
}
public
function
getCreateObjectTitleForFeed
(
$author
,
$object
)
{
return
pht
(
'%s created %s.'
,
$author
,
$object
);
}
protected
function
shouldSendMail
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
return
true
;
}
protected
function
buildReplyHandler
(
PhabricatorLiskDAO
$object
)
{
return
id
(
new
PhabricatorMacroReplyHandler
())
->
setMailReceiver
(
$object
);
}
protected
function
buildMailTemplate
(
PhabricatorLiskDAO
$object
)
{
$name
=
$object
->
getName
();
$name
=
'Image Macro "'
.
$name
.
'"'
;
return
id
(
new
PhabricatorMetaMTAMail
())
->
setSubject
(
$name
);
}
protected
function
getMailTo
(
PhabricatorLiskDAO
$object
)
{
return
array
(
$this
->
requireActor
()->
getPHID
(),
);
}
protected
function
buildMailBody
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
$body
=
parent
::
buildMailBody
(
$object
,
$xactions
);
$body
->
addLinkSection
(
pht
(
'MACRO DETAIL'
),
PhabricatorEnv
::
getProductionURI
(
'/macro/view/'
.
$object
->
getID
().
'/'
));
return
$body
;
}
protected
function
getMailSubjectPrefix
()
{
return
pht
(
'[Macro]'
);
}
protected
function
shouldPublishFeedStory
(
PhabricatorLiskDAO
$object
,
array
$xactions
)
{
return
true
;
}
}
Event Timeline
Log In to Comment