Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F116085104
PhabricatorNotificationIndividualController.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
Wed, Jun 4, 20:35
Size
926 B
Mime Type
text/x-php
Expires
Fri, Jun 6, 20:35 (9 h, 41 m)
Engine
blob
Format
Raw Data
Handle
26558922
Attached To
rPH Phabricator
PhabricatorNotificationIndividualController.php
View Options
<?php
final
class
PhabricatorNotificationIndividualController
extends
PhabricatorNotificationController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$stories
=
id
(
new
PhabricatorNotificationQuery
())
->
setViewer
(
$user
)
->
withUserPHIDs
(
array
(
$user
->
getPHID
()))
->
withKeys
(
array
(
$request
->
getStr
(
'key'
)))
->
execute
();
if
(!
$stories
)
{
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
array
(
'pertinent'
=>
false
,
));
}
$builder
=
new
PhabricatorNotificationBuilder
(
$stories
);
$content
=
$builder
->
buildView
()->
render
();
$response
=
array
(
'pertinent'
=>
true
,
'primaryObjectPHID'
=>
head
(
$stories
)->
getPrimaryObjectPHID
(),
'content'
=>
hsprintf
(
'%s'
,
$content
),
);
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
$response
);
}
}
Event Timeline
Log In to Comment