Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/paste/controller/PhabricatorPasteController.php
12242 views
1
<?php
2
3
abstract class PhabricatorPasteController extends PhabricatorController {
4
5
public function buildApplicationMenu() {
6
return $this->newApplicationMenu()
7
->setSearchEngine(new PhabricatorPasteSearchEngine());
8
}
9
10
public function buildSourceCodeView(
11
PhabricatorPaste $paste,
12
$highlights = array()) {
13
14
$lines = phutil_split_lines($paste->getContent());
15
16
return id(new PhabricatorSourceCodeView())
17
->setLines($lines)
18
->setHighlights($highlights)
19
->setURI(new PhutilURI($paste->getURI()));
20
}
21
22
}
23
24