Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106004658
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
Fri, Mar 21, 10:50
Size
878 B
Mime Type
text/x-php
Expires
Sun, Mar 23, 10:50 (2 d)
Engine
blob
Format
Raw Data
Handle
24909790
Attached To
rPH Phabricator
PhabricatorSearchBaseController.php
View Options
<?php
abstract
class
PhabricatorSearchBaseController
extends
PhabricatorController
{
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