Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122572571
DiffusionPreCommitContentRepositoryProjectsHeraldField.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
Sun, Jul 20, 13:58
Size
909 B
Mime Type
text/x-php
Expires
Tue, Jul 22, 13:58 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27503617
Attached To
rPH Phabricator
DiffusionPreCommitContentRepositoryProjectsHeraldField.php
View Options
<?php
final
class
DiffusionPreCommitContentRepositoryProjectsHeraldField
extends
DiffusionPreCommitContentHeraldField
{
const
FIELDCONST
=
'diffusion.pre.content.repository.projects'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Repository projects'
);
}
public
function
getHeraldFieldValue
(
$object
)
{
return
PhabricatorEdgeQuery
::
loadDestinationPHIDs
(
$this
->
getAdapter
()->
getHookEngine
()->
getRepository
()->
getPHID
(),
PhabricatorProjectObjectHasProjectEdgeType
::
EDGECONST
);
}
protected
function
getHeraldFieldStandardType
()
{
return
HeraldField
::
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_PROJECT
;
}
}
}
Event Timeline
Log In to Comment