Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100209283
HeraldAnotherRuleField.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
Wed, Jan 29, 01:31
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Jan 31, 01:31 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23841667
Attached To
rPH Phabricator
HeraldAnotherRuleField.php
View Options
<?php
final
class
HeraldAnotherRuleField
extends
HeraldField
{
const
FIELDCONST
=
'rule'
;
public
function
getHeraldFieldName
()
{
return
pht
(
'Another Herald rule'
);
}
public
function
getFieldGroupKey
()
{
return
HeraldBasicFieldGroup
::
FIELDGROUPKEY
;
}
public
function
supportsObject
(
$object
)
{
return
true
;
}
public
function
getHeraldFieldValue
(
$object
)
{
return
null
;
}
public
function
getHeraldFieldConditions
()
{
return
array
(
HeraldAdapter
::
CONDITION_RULE
,
HeraldAdapter
::
CONDITION_NOT_RULE
,
);
}
public
function
getHeraldFieldValueType
(
$condition
)
{
// NOTE: This is a bit magical because we don't currently have a reasonable
// way to populate it from here.
return
id
(
new
HeraldSelectFieldValue
())
->
setKey
(
self
::
FIELDCONST
)
->
setOptions
(
array
());
}
public
function
renderConditionValue
(
PhabricatorUser
$viewer
,
$condition
,
$value
)
{
$value
=
(
array
)
$value
;
return
$viewer
->
renderHandleList
(
$value
);
}
}
Event Timeline
Log In to Comment