Page MenuHomePhorge

PhabricatorSourceDocumentEngine.php
No OneTemporary

Size
699 B
Referenced Files
None
Subscribers
None

PhabricatorSourceDocumentEngine.php

<?php
final class PhabricatorSourceDocumentEngine
extends PhabricatorTextDocumentEngine {
const ENGINEKEY = 'source';
public function getViewAsLabel(PhabricatorDocumentRef $ref) {
return pht('View as Source');
}
protected function getDocumentIconIcon(PhabricatorDocumentRef $ref) {
return 'fa-code';
}
protected function getContentScore(PhabricatorDocumentRef $ref) {
return 1500;
}
protected function newDocumentContent(PhabricatorDocumentRef $ref) {
$content = $this->loadTextData($ref);
$content = PhabricatorSyntaxHighlighter::highlightWithFilename(
$ref->getName(),
$content);
return $this->newTextDocumentContent($content);
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Jun 18, 8:26 PM (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
238849
Default Alt Text
PhabricatorSourceDocumentEngine.php (699 B)

Event Timeline