Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90666083
LegalpadController.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, Nov 3, 17:16
Size
930 B
Mime Type
text/x-php
Expires
Tue, Nov 5, 17:16 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22116639
Attached To
rPH Phabricator
LegalpadController.php
View Options
<?php
/**
* @group legalpad
*/
abstract
class
LegalpadController
extends
PhabricatorController
{
public
function
buildSideNav
(
$for_app
=
false
)
{
$user
=
$this
->
getRequest
()->
getUser
();
$nav
=
new
AphrontSideNavFilterView
();
$nav
->
setBaseURI
(
new
PhutilURI
(
$this
->
getApplicationURI
()));
if
(
$for_app
)
{
$nav
->
addFilter
(
'create/'
,
pht
(
'Create Document'
));
}
id
(
new
LegalpadDocumentSearchEngine
())
->
setViewer
(
$user
)
->
addNavigationItems
(
$nav
->
getMenu
());
return
$nav
;
}
public
function
buildApplicationCrumbs
()
{
$crumbs
=
parent
::
buildApplicationCrumbs
();
$crumbs
->
addAction
(
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Create Document'
))
->
setHref
(
$this
->
getApplicationURI
(
'create/'
))
->
setIcon
(
'create'
));
return
$crumbs
;
}
public
function
buildApplicationMenu
()
{
return
$this
->
buildSideNav
(
true
)->
getMenu
();
}
}
Event Timeline
Log In to Comment