Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104792604
PhabricatorActivitySettingsPanel.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, Mar 12, 10:35
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Mar 14, 10:35 (2 d)
Engine
blob
Format
Raw Data
Handle
24854450
Attached To
rPH Phabricator
PhabricatorActivitySettingsPanel.php
View Options
<?php
final
class
PhabricatorActivitySettingsPanel
extends
PhabricatorSettingsPanel
{
public
function
getPanelKey
()
{
return
'activity'
;
}
public
function
getPanelName
()
{
return
pht
(
'Activity Logs'
);
}
public
function
getPanelGroupKey
()
{
return
PhabricatorSettingsLogsPanelGroup
::
PANELGROUPKEY
;
}
public
function
processRequest
(
AphrontRequest
$request
)
{
$viewer
=
$request
->
getUser
();
$user
=
$this
->
getUser
();
$pager
=
id
(
new
AphrontCursorPagerView
())
->
readFromRequest
(
$request
);
$logs
=
id
(
new
PhabricatorPeopleLogQuery
())
->
setViewer
(
$viewer
)
->
withRelatedPHIDs
(
array
(
$user
->
getPHID
()))
->
executeWithCursorPager
(
$pager
);
$phids
=
array
();
foreach
(
$logs
as
$log
)
{
$phids
[]
=
$log
->
getUserPHID
();
$phids
[]
=
$log
->
getActorPHID
();
}
if
(
$phids
)
{
$handles
=
id
(
new
PhabricatorHandleQuery
())
->
setViewer
(
$viewer
)
->
withPHIDs
(
$phids
)
->
execute
();
}
else
{
$handles
=
array
();
}
$table
=
id
(
new
PhabricatorUserLogView
())
->
setUser
(
$viewer
)
->
setLogs
(
$logs
)
->
setHandles
(
$handles
);
$panel
=
id
(
new
PHUIObjectBoxView
())
->
setHeaderText
(
pht
(
'Account Activity Logs'
))
->
setBackground
(
PHUIObjectBoxView
::
BLUE_PROPERTY
)
->
setTable
(
$table
);
$pager_box
=
id
(
new
PHUIBoxView
())
->
addMargin
(
PHUI
::
MARGIN_LARGE
)
->
appendChild
(
$pager
);
return
array
(
$panel
,
$pager_box
);
}
public
function
isManagementPanel
()
{
return
true
;
}
}
Event Timeline
Log In to Comment