Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102255800
PhabricatorLiskSearchEngineExtension.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
Tue, Feb 18, 19:36
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Feb 20, 19:36 (2 d)
Engine
blob
Format
Raw Data
Handle
24286223
Attached To
rPH Phabricator
PhabricatorLiskSearchEngineExtension.php
View Options
<?php
final
class
PhabricatorLiskSearchEngineExtension
extends
PhabricatorSearchEngineExtension
{
const
EXTENSIONKEY
=
'lisk'
;
public
function
isExtensionEnabled
()
{
return
true
;
}
public
function
getExtensionName
()
{
return
pht
(
'Lisk Builtin Properties'
);
}
public
function
getExtensionOrder
()
{
return
5000
;
}
public
function
supportsObject
(
$object
)
{
if
(!(
$object
instanceof
LiskDAO
))
{
return
false
;
}
if
(!
$object
->
getConfigOption
(
LiskDAO
::
CONFIG_TIMESTAMPS
))
{
return
false
;
}
return
true
;
}
public
function
getFieldSpecificationsForConduit
(
$object
)
{
return
array
(
id
(
new
PhabricatorConduitSearchFieldSpecification
())
->
setKey
(
'dateCreated'
)
->
setType
(
'int'
)
->
setDescription
(
pht
(
'Epoch timestamp when the object was created.'
)),
id
(
new
PhabricatorConduitSearchFieldSpecification
())
->
setKey
(
'dateModified'
)
->
setType
(
'int'
)
->
setDescription
(
pht
(
'Epoch timestamp when the object was last updated.'
)),
);
}
public
function
getFieldValuesForConduit
(
$object
)
{
return
array
(
'dateCreated'
=>
(
int
)
$object
->
getDateCreated
(),
'dateModified'
=>
(
int
)
$object
->
getDateModified
(),
);
}
}
Event Timeline
Log In to Comment