Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F110599728
LegalpadDocumentListController.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
Sun, Apr 27, 02:16
Size
1 KB
Mime Type
text/x-php
Expires
Tue, Apr 29, 02:16 (2 d)
Engine
blob
Format
Raw Data
Handle
25832771
Attached To
rPH Phabricator
LegalpadDocumentListController.php
View Options
<?php
final
class
LegalpadDocumentListController
extends
LegalpadController
{
private
$queryKey
;
public
function
shouldAllowPublic
()
{
return
true
;
}
public
function
willProcessRequest
(
array
$data
)
{
$this
->
queryKey
=
idx
(
$data
,
'queryKey'
);
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$controller
=
id
(
new
PhabricatorApplicationSearchController
(
$request
))
->
setQueryKey
(
$this
->
queryKey
)
->
setSearchEngine
(
new
LegalpadDocumentSearchEngine
())
->
setNavigation
(
$this
->
buildSideNav
());
return
$this
->
delegateToController
(
$controller
);
}
public
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$can_create
=
$this
->
hasApplicationCapability
(
LegalpadCapabilityCreateDocuments
::
CAPABILITY
);
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Create Document'
))
->
setHref
(
$this
->
getApplicationURI
(
'create/'
))
->
setIcon
(
'fa-plus-square'
)
->
setDisabled
(!
$can_create
)
->
setWorkflow
(!
$can_create
));
return
$crumbs
;
}
}
Event Timeline
Log In to Comment