Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93458440
PhabricatorPeopleFeedController.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
Thu, Nov 28, 22:26
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Nov 30, 22:26 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22643832
Attached To
rPH Phabricator
PhabricatorPeopleFeedController.php
View Options
<?php
final
class
PhabricatorPeopleFeedController
extends
PhabricatorPeopleController
{
private
$username
;
public
function
shouldRequireAdmin
()
{
return
false
;
}
public
function
willProcessRequest
(
array
$data
)
{
$this
->
username
=
idx
(
$data
,
'username'
);
}
public
function
processRequest
()
{
require_celerity_resource
(
'phabricator-profile-css'
);
$viewer
=
$this
->
getRequest
()->
getUser
();
$user
=
id
(
new
PhabricatorPeopleQuery
())
->
setViewer
(
$viewer
)
->
withUsernames
(
array
(
$this
->
username
))
->
needProfileImage
(
true
)
->
executeOne
();
if
(!
$user
)
{
return
new
Aphront404Response
();
}
$query
=
new
PhabricatorFeedQuery
();
$query
->
setFilterPHIDs
(
array
(
$user
->
getPHID
(),
));
$query
->
setLimit
(
100
);
$query
->
setViewer
(
$viewer
);
$stories
=
$query
->
execute
();
$builder
=
new
PhabricatorFeedBuilder
(
$stories
);
$builder
->
setUser
(
$viewer
);
$builder
->
setShowHovercards
(
true
);
$builder
->
setNoDataString
(
pht
(
'To begin on such a grand journey, requires but just a single step.'
));
$view
=
$builder
->
buildView
();
$feed
=
phutil_tag_div
(
'phabricator-project-feed'
,
$view
->
render
());
$name
=
$user
->
getUsername
();
$nav
=
$this
->
buildIconNavView
(
$user
);
$nav
->
selectFilter
(
"{$name}/feed/"
);
$nav
->
appendChild
(
$feed
);
return
$this
->
buildApplicationPage
(
$nav
,
array
(
'title'
=>
pht
(
'Feed'
),
));
}
}
Event Timeline
Log In to Comment