Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92792975
DiffusionRepositoryURIsSearchEngineAttachment.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
Sat, Nov 23, 18:35
Size
799 B
Mime Type
text/x-php
Expires
Mon, Nov 25, 18:35 (2 d)
Engine
blob
Format
Raw Data
Handle
22515325
Attached To
rPH Phabricator
DiffusionRepositoryURIsSearchEngineAttachment.php
View Options
<?php
final
class
DiffusionRepositoryURIsSearchEngineAttachment
extends
PhabricatorSearchEngineAttachment
{
public
function
getAttachmentName
()
{
return
pht
(
'Repository URIs'
);
}
public
function
getAttachmentDescription
()
{
return
pht
(
'Get a list of associated URIs for each repository.'
);
}
public
function
willLoadAttachmentData
(
$query
,
$spec
)
{
$query
->
needURIs
(
true
);
}
public
function
getAttachmentForObject
(
$object
,
$data
,
$spec
)
{
$uris
=
array
();
foreach
(
$object
->
getURIs
()
as
$uri
)
{
$uris
[]
=
array
(
'id'
=>
$uri
->
getID
(),
'type'
=>
phid_get_type
(
$uri
->
getPHID
()),
'phid'
=>
$uri
->
getPHID
(),
'fields'
=>
$uri
->
getFieldValuesForConduit
(),
);
}
return
array
(
'uris'
=>
$uris
,
);
}
}
Event Timeline
Log In to Comment