Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96196402
PhabricatorSearchBaseController.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
Mon, Dec 23, 16:25
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 16:25 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23142359
Attached To
rPH Phabricator
PhabricatorSearchBaseController.php
View Options
<?php
abstract
class
PhabricatorSearchBaseController
extends
PhabricatorController
{
const
ACTION_ATTACH
=
'attach'
;
const
ACTION_MERGE
=
'merge'
;
const
ACTION_DEPENDENCIES
=
'dependencies'
;
const
ACTION_BLOCKS
=
'blocks'
;
const
ACTION_EDGE
=
'edge'
;
protected
function
loadRelationshipObject
()
{
$request
=
$this
->
getRequest
();
$viewer
=
$this
->
getViewer
();
$phid
=
$request
->
getURIData
(
'sourcePHID'
);
return
id
(
new
PhabricatorObjectQuery
())
->
setViewer
(
$viewer
)
->
withPHIDs
(
array
(
$phid
))
->
requireCapabilities
(
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
))
->
executeOne
();
}
protected
function
loadRelationship
(
$object
)
{
$request
=
$this
->
getRequest
();
$viewer
=
$this
->
getViewer
();
$relationship_key
=
$request
->
getURIData
(
'relationshipKey'
);
$list
=
PhabricatorObjectRelationshipList
::
newForObject
(
$viewer
,
$object
);
return
$list
->
getRelationship
(
$relationship_key
);
}
}
Event Timeline
Log In to Comment