Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F81450668
PhabricatorNotificationPanelController.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, Sep 6, 03:31
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Sep 8, 03:31 (2 d)
Engine
blob
Format
Raw Data
Handle
20569371
Attached To
rPH Phabricator
PhabricatorNotificationPanelController.php
View Options
<?php
final
class
PhabricatorNotificationPanelController
extends
PhabricatorNotificationController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$query
=
new
PhabricatorNotificationQuery
();
$query
->
setViewer
(
$user
);
$query
->
setUserPHID
(
$user
->
getPHID
());
$query
->
setLimit
(
15
);
$stories
=
$query
->
execute
();
if
(
$stories
)
{
$builder
=
new
PhabricatorNotificationBuilder
(
$stories
);
$notifications_view
=
$builder
->
buildView
();
$content
=
$notifications_view
->
render
();
}
else
{
$content
=
'<div class="phabricator-notification no-notifications">'
.
'You have no notifications.'
.
'</div>'
;
}
$content
=
'<div class="phabricator-notification-header">'
.
pht
(
'Notifications'
).
'</div>'
.
$content
.
'<div class="phabricator-notification-view-all">'
.
phutil_tag
(
'a'
,
array
(
'href'
=>
'/notification/'
,
),
'View All Notifications'
).
'</div>'
;
$unread_count
=
id
(
new
PhabricatorFeedStoryNotification
())
->
countUnread
(
$user
);
$json
=
array
(
'content'
=>
$content
,
'number'
=>
$unread_count
,
);
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
$json
);
}
}
Event Timeline
Log In to Comment