Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F547422
DifferentialActionEmailCommand.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
DifferentialActionEmailCommand.php
View Options
<?php
final
class
DifferentialActionEmailCommand
extends
MetaMTAEmailTransactionCommand
{
private
$command
;
private
$action
;
private
$aliases
;
private
$commandSummary
;
private
$commandDescription
;
public
function
getCommand
()
{
return
$this
->
command
;
}
private
function
setCommand
(
$command
)
{
$this
->
command
=
$command
;
return
$this
;
}
private
function
setAction
(
$action
)
{
$this
->
action
=
$action
;
return
$this
;
}
private
function
getAction
()
{
return
$this
->
action
;
}
private
function
setCommandAliases
(
array
$aliases
)
{
$this
->
aliases
=
$aliases
;
return
$this
;
}
public
function
getCommandAliases
()
{
return
$this
->
aliases
;
}
public
function
setCommandSummary
(
$command_summary
)
{
$this
->
commandSummary
=
$command_summary
;
return
$this
;
}
public
function
getCommandSummary
()
{
return
$this
->
commandSummary
;
}
public
function
setCommandDescription
(
$command_description
)
{
$this
->
commandDescription
=
$command_description
;
return
$this
;
}
public
function
getCommandDescription
()
{
return
$this
->
commandDescription
;
}
public
function
getCommandObjects
()
{
$actions
=
DifferentialRevisionActionTransaction
::
loadAllActions
();
$actions
=
msortv
(
$actions
,
'getRevisionActionOrderVector'
);
$objects
=
array
();
foreach
(
$actions
as
$action
)
{
$keyword
=
$action
->
getCommandKeyword
();
if
(
$keyword
===
null
)
{
continue
;
}
$aliases
=
$action
->
getCommandAliases
();
$summary
=
$action
->
getCommandSummary
();
$object
=
id
(
new
self
())
->
setCommand
(
$keyword
)
->
setCommandAliases
(
$aliases
)
->
setAction
(
$action
->
getTransactionTypeConstant
())
->
setCommandSummary
(
$summary
);
$objects
[]
=
$object
;
}
return
$objects
;
}
public
function
isCommandSupportedForObject
(
PhabricatorApplicationTransactionInterface
$object
)
{
return
(
$object
instanceof
DifferentialRevision
);
}
public
function
buildTransactions
(
PhabricatorUser
$viewer
,
PhabricatorApplicationTransactionInterface
$object
,
PhabricatorMetaMTAReceivedMail
$mail
,
$command
,
array
$argv
)
{
$xactions
=
array
();
$xactions
[]
=
$object
->
getApplicationTransactionTemplate
()
->
setTransactionType
(
$this
->
getAction
())
->
setNewValue
(
true
);
return
$xactions
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:33 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
122793
Default Alt Text
DifferentialActionEmailCommand.php (2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment