Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2990186
DiffusionCommitPackageAuditHeraldField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
DiffusionCommitPackageAuditHeraldField.php
View Options
<?php
final
class
DiffusionCommitPackageAuditHeraldField
extends
DiffusionCommitHeraldField
{
const
FIELDCONST
=
'diffusion.commit.package.audit'
;
// hide "Affected packages that need audit" Herald condition
// if Audit not installed
public
function
supportsObject
(
$object
)
{
if
(
id
(
new
PhabricatorAuditApplication
(
)
)
->
isInstalled
(
)
)
{
return
(
$object
instanceof
PhabricatorRepositoryCommit
)
;
}
else
{
return
false
;
}
}
public
function
getHeraldFieldName
(
)
{
return
pht
(
'Affected packages that need audit'
)
;
}
public
function
getFieldGroupKey
(
)
{
return
HeraldRelatedFieldGroup
::
FIELDGROUPKEY
;
}
public
function
getHeraldFieldValue
(
$object
)
{
$packages
=
$this
->
getAdapter
(
)
->
loadAuditNeededPackages
(
)
;
if
(
!
$packages
)
{
return
array
(
)
;
}
return
mpull
(
$packages
,
'getPHID'
)
;
}
protected
function
getHeraldFieldStandardType
(
)
{
return
self
::
STANDARD_PHID_LIST
;
}
protected
function
getDatasource
(
)
{
return
new
PhabricatorOwnersPackageDatasource
(
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Feb 22, 20:54 (18 h, 22 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1179955
Default Alt Text
DiffusionCommitPackageAuditHeraldField.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment