Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93590324
DiffusionPreCommitRefChangeHeraldField.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 29, 23:56
Size
787 B
Mime Type
text/x-php
Expires
Sun, Dec 1, 23:56 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22668744
Attached To
rPH Phabricator
DiffusionPreCommitRefChangeHeraldField.php
View Options
<?php
final
class
DiffusionPreCommitRefChangeHeraldField
extends
DiffusionPreCommitRefHeraldField
{
const
FIELDCONST
=
'diffusion.pre.ref.change'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Ref change type'
);
}
public
function
getHeraldFieldValue
(
$object
)
{
return
$object
->
getChangeFlags
();
}
public
function
getHeraldFieldConditions
()
{
return
array
(
HeraldAdapter
::
CONDITION_HAS_BIT
,
HeraldAdapter
::
CONDITION_NOT_BIT
,
);
}
public
function
getHeraldFieldValueType
(
$condition
)
{
return
id
(
new
HeraldSelectFieldValue
())
->
setKey
(
self
::
FIELDCONST
)
->
setOptions
(
PhabricatorRepositoryPushLog
::
getHeraldChangeFlagConditionOptions
())
->
setDefault
(
PhabricatorRepositoryPushLog
::
CHANGEFLAG_ADD
);
}
}
Event Timeline
Log In to Comment