Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93053208
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
Mon, Nov 25, 20:36
Size
938 B
Mime Type
text/x-php
Expires
Wed, Nov 27, 20:36 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22563715
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
(
'fa-plus-square'
));
return
$crumbs
;
}
public
function
buildApplicationMenu
()
{
return
$this
->
buildSideNav
(
true
)->
getMenu
();
}
}
Event Timeline
Log In to Comment