Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2894914
PhabricatorProjectsSearchEngineAttachment.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
PhabricatorProjectsSearchEngineAttachment.php
View Options
<?php
final
class
PhabricatorProjectsSearchEngineAttachment
extends
PhabricatorSearchEngineAttachment
{
public
function
getAttachmentName
(
)
{
return
pht
(
'Projects'
)
;
}
public
function
getAttachmentDescription
(
)
{
return
pht
(
'Get information about projects.'
)
;
}
public
function
loadAttachmentData
(
array
$objects
,
$spec
)
{
$object_phids
=
mpull
(
$objects
,
'getPHID'
)
;
$projects_query
=
id
(
new
PhabricatorEdgeQuery
(
)
)
->
withSourcePHIDs
(
$object_phids
)
->
withEdgeTypes
(
array
(
PhabricatorProjectObjectHasProjectEdgeType
::
EDGECONST
,
)
)
;
$projects_query
->
execute
(
)
;
return
array
(
'projects.query'
=>
$projects_query
,
)
;
}
public
function
getAttachmentForObject
(
$object
,
$data
,
$spec
)
{
$projects_query
=
$data
[
'projects.query'
]
;
$object_phid
=
$object
->
getPHID
(
)
;
$project_phids
=
$projects_query
->
getDestinationPHIDs
(
array
(
$object_phid
)
,
array
(
PhabricatorProjectObjectHasProjectEdgeType
::
EDGECONST
)
)
;
return
array
(
'projectPHIDs'
=>
array_values
(
$project_phids
)
,
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Jan 19 2025, 20:41 (6 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128535
Default Alt Text
PhabricatorProjectsSearchEngineAttachment.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment