Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/document/PhabricatorImageDocumentEngine.php
<?php | <?php | ||||
final class PhabricatorImageDocumentEngine | final class PhabricatorImageDocumentEngine | ||||
extends PhabricatorDocumentEngine { | extends PhabricatorDocumentEngine { | ||||
const ENGINEKEY = 'image'; | const ENGINEKEY = 'image'; | ||||
public function getViewAsLabel(PhabricatorDocumentRef $ref) { | |||||
return pht('View as Image'); | |||||
} | |||||
protected function getDocumentIconIcon(PhabricatorDocumentRef $ref) { | protected function getDocumentIconIcon(PhabricatorDocumentRef $ref) { | ||||
return 'fa-file-image-o'; | return 'fa-file-image-o'; | ||||
} | } | ||||
protected function canRenderDocumentType(PhabricatorDocumentRef $ref) { | protected function canRenderDocumentType(PhabricatorDocumentRef $ref) { | ||||
$file = $ref->getFile(); | $file = $ref->getFile(); | ||||
if ($file) { | if ($file) { | ||||
return $file->isViewableImage(); | return $file->isViewableImage(); | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |