Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F976139
PhabricatorNotificationPanelController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
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
=
phutil_tag_div
(
'phabricator-notification no-notifications'
,
pht
(
'You have no notifications.'
));
}
$content
=
hsprintf
(
'<div class="phabricator-notification-header">%s</div>'
.
'%s'
.
'<div class="phabricator-notification-view-all">%s</div>'
,
pht
(
'Notifications'
),
$content
,
phutil_tag
(
'a'
,
array
(
'href'
=>
'/notification/'
,
),
'View All Notifications'
));
$unread_count
=
id
(
new
PhabricatorFeedStoryNotification
())
->
countUnread
(
$user
);
$json
=
array
(
'content'
=>
$content
,
'number'
=>
(
int
)
$unread_count
,
);
return
id
(
new
AphrontAjaxResponse
())->
setContent
(
$json
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 9:28 AM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
225916
Default Alt Text
PhabricatorNotificationPanelController.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment