Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1078543
HeraldRuleEditor.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
HeraldRuleEditor.php
View Options
<?php
final
class
HeraldRuleEditor
extends
PhabricatorApplicationTransactionEditor
{
public
function
getEditorApplicationClass
()
{
return
'PhabricatorHeraldApplication'
;
}
public
function
getEditorObjectsDescription
()
{
return
pht
(
'Herald Rules'
);
}
public
function
getTransactionTypes
()
{
$types
=
parent
::
getTransactionTypes
();
$types
[]
=
PhabricatorTransactions
::
TYPE_COMMENT
;
$types
[]
=
HeraldRuleTransaction
::
TYPE_DISABLE
;
return
$types
;
}
protected
function
getCustomTransactionOldValue
(
PhabricatorLiskDAO
$object
,
PhabricatorApplicationTransaction
$xaction
)
{
switch
(
$xaction
->
getTransactionType
())
{
case
HeraldRuleTransaction
::
TYPE_DISABLE
:
return
(
int
)
$object
->
getIsDisabled
();
}
}
protected
function
getCustomTransactionNewValue
(
PhabricatorLiskDAO
$object
,
PhabricatorApplicationTransaction
$xaction
)
{
switch
(
$xaction
->
getTransactionType
())
{
case
HeraldRuleTransaction
::
TYPE_DISABLE
:
return
(
int
)
$xaction
->
getNewValue
();
}
}
protected
function
applyCustomInternalTransaction
(
PhabricatorLiskDAO
$object
,
PhabricatorApplicationTransaction
$xaction
)
{
switch
(
$xaction
->
getTransactionType
())
{
case
HeraldRuleTransaction
::
TYPE_DISABLE
:
return
$object
->
setIsDisabled
(
$xaction
->
getNewValue
());
}
}
protected
function
applyCustomExternalTransaction
(
PhabricatorLiskDAO
$object
,
PhabricatorApplicationTransaction
$xaction
)
{
return
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jun 29, 7:53 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
263986
Default Alt Text
HeraldRuleEditor.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment