Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97888932
HeraldRuleEditHistoryController.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
Tue, Jan 7, 05:40
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Jan 9, 05:40 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23431510
Attached To
rPH Phabricator
HeraldRuleEditHistoryController.php
View Options
<?php
final
class
HeraldRuleEditHistoryController
extends
HeraldController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
idx
(
$data
,
'id'
);
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$edit_query
=
new
HeraldEditLogQuery
();
if
(
$this
->
id
)
{
$edit_query
->
withRuleIDs
(
array
(
$this
->
id
));
}
$pager
=
new
AphrontPagerView
();
$pager
->
setURI
(
$request
->
getRequestURI
(),
'offset'
);
$pager
->
setOffset
(
$request
->
getStr
(
'offset'
));
$edits
=
$edit_query
->
executeWithOffsetPager
(
$pager
);
$need_phids
=
mpull
(
$edits
,
'getEditorPHID'
);
$handles
=
$this
->
loadViewerHandles
(
$need_phids
);
$list_view
=
id
(
new
HeraldRuleEditHistoryView
())
->
setEdits
(
$edits
)
->
setHandles
(
$handles
)
->
setUser
(
$this
->
getRequest
()->
getUser
());
$panel
=
new
AphrontPanelView
();
$panel
->
setHeader
(
pht
(
'Edit History'
));
$panel
->
appendChild
(
$list_view
);
$panel
->
setNoBackground
();
$crumbs
=
$this
->
buildApplicationCrumbs
(
$can_create
=
false
)
->
addTextCrumb
(
pht
(
'Edit History'
),
$this
->
getApplicationURI
(
'herald/history'
));
$nav
=
$this
->
buildSideNavView
();
$nav
->
selectFilter
(
'history'
);
$nav
->
appendChild
(
$panel
);
$nav
->
setCrumbs
(
$crumbs
);
return
$this
->
buildApplicationPage
(
$nav
,
array
(
'title'
=>
pht
(
'Rule Edit History'
),
'device'
=>
true
,
));
}
}
Event Timeline
Log In to Comment