Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97208584
PhabricatorProjectFeedController.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, Jan 3, 11:16
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 5, 11:16 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23354788
Attached To
rPH Phabricator
PhabricatorProjectFeedController.php
View Options
<?php
final
class
PhabricatorProjectFeedController
extends
PhabricatorProjectController
{
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
handleRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getUser
();
$response
=
$this
->
loadProject
();
if
(
$response
)
{
return
$response
;
}
$project
=
$this
->
getProject
();
$id
=
$project
->
getID
();
$stories
=
id
(
new
PhabricatorFeedQuery
())
->
setViewer
(
$viewer
)
->
setFilterPHIDs
(
array
(
$project
->
getPHID
(),
))
->
setLimit
(
50
)
->
execute
();
$feed
=
$this
->
renderStories
(
$stories
);
$box
=
id
(
new
PHUIObjectBoxView
())
->
setHeaderText
(
pht
(
'Project Activity'
))
->
appendChild
(
$feed
);
$nav
=
$this
->
buildIconNavView
(
$project
);
$nav
->
selectFilter
(
"feed/{$id}/"
);
$nav
->
appendChild
(
$box
);
return
$this
->
buildApplicationPage
(
$nav
,
array
(
'title'
=>
$project
->
getName
(),
));
}
private
function
renderStories
(
array
$stories
)
{
assert_instances_of
(
$stories
,
'PhabricatorFeedStory'
);
$builder
=
new
PhabricatorFeedBuilder
(
$stories
);
$builder
->
setUser
(
$this
->
getRequest
()->
getUser
());
$builder
->
setShowHovercards
(
true
);
$view
=
$builder
->
buildView
();
return
phutil_tag_div
(
'profile-feed'
,
$view
->
render
());
}
}
Event Timeline
Log In to Comment