1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-09 22:31:03 +01:00
phorge-phorge/src/applications/legalpad/controller/LegalpadController.php

30 lines
626 B
PHP
Raw Normal View History

<?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 buildApplicationMenu() {
return $this->buildSideNav(true)->getMenu();
}
}