Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82560872
HeraldRuleEditor.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
Thu, Sep 12, 03:13
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Sep 14, 03:13 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20714197
Attached To
rPH Phabricator
HeraldRuleEditor.php
View Options
<?php
final
class
HeraldRuleEditor
extends
PhabricatorApplicationTransactionEditor
{
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
;
}
}
Event Timeline
Log In to Comment