Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110309520
DiffusionCommitPackageAuditHeraldField.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, Apr 25, 16:28
Size
852 B
Mime Type
text/x-php
Expires
Sun, Apr 27, 16:28 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25804255
Attached To
rPH Phabricator
DiffusionCommitPackageAuditHeraldField.php
View Options
<?php
final
class
DiffusionCommitPackageAuditHeraldField
extends
DiffusionCommitHeraldField
{
const
FIELDCONST
=
'diffusion.commit.package.audit'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Affected packages that need audit'
);
}
public
function
getHeraldFieldValue
(
$object
)
{
$packages
=
$this
->
getAdapter
()->
loadAuditNeededPackages
();
if
(!
$packages
)
{
return
array
();
}
return
mpull
(
$packages
,
'getPHID'
);
}
protected
function
getHeraldFieldStandardType
()
{
return
self
::
STANDARD_PHID_LIST
;
}
public
function
getHeraldFieldValueType
(
$condition
)
{
switch
(
$condition
)
{
case
HeraldAdapter
::
CONDITION_EXISTS
:
case
HeraldAdapter
::
CONDITION_NOT_EXISTS
:
return
HeraldAdapter
::
VALUE_NONE
;
default
:
return
HeraldAdapter
::
VALUE_OWNERS_PACKAGE
;
}
}
}
Event Timeline
Log In to Comment