Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97271179
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
Fri, Jan 3, 22:48
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 5, 22:48 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23370762
Attached To
rPH Phabricator
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
;
}
}
Event Timeline
Log In to Comment