Changeset View
Changeset View
Standalone View
Standalone View
src/view/form/control/PhabricatorRemarkupControl.php
<?php | <?php | ||||
final class PhabricatorRemarkupControl | final class PhabricatorRemarkupControl | ||||
extends AphrontFormTextAreaControl { | extends AphrontFormTextAreaControl { | ||||
private $disableMacro = false; | |||||
private $disableFullScreen = false; | private $disableFullScreen = false; | ||||
private $canPin; | private $canPin; | ||||
private $sendOnEnter = false; | private $sendOnEnter = false; | ||||
private $remarkupMetadata = array(); | private $remarkupMetadata = array(); | ||||
public function setDisableMacros($disable) { | |||||
$this->disableMacro = $disable; | |||||
return $this; | |||||
} | |||||
public function setDisableFullScreen($disable) { | public function setDisableFullScreen($disable) { | ||||
$this->disableFullScreen = $disable; | $this->disableFullScreen = $disable; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function setCanPin($can_pin) { | public function setCanPin($can_pin) { | ||||
$this->canPin = $can_pin; | $this->canPin = $can_pin; | ||||
return $this; | return $this; | ||||
▲ Show 20 Lines • Show All 204 Lines • ▼ Show 20 Lines | $actions = array( | ||||
'tip' => pht('Table'), | 'tip' => pht('Table'), | ||||
'nodevice' => true, | 'nodevice' => true, | ||||
), | ), | ||||
'fa-cloud-upload' => array( | 'fa-cloud-upload' => array( | ||||
'tip' => pht('Upload File'), | 'tip' => pht('Upload File'), | ||||
), | ), | ||||
); | ); | ||||
$can_use_macros = | $can_use_macros = function_exists('imagettftext'); | ||||
(!$this->disableMacro) && | |||||
(function_exists('imagettftext')); | |||||
if ($can_use_macros) { | if ($can_use_macros) { | ||||
$can_use_macros = PhabricatorApplication::isClassInstalledForViewer( | $can_use_macros = PhabricatorApplication::isClassInstalledForViewer( | ||||
'PhabricatorMacroApplication', | 'PhabricatorMacroApplication', | ||||
$viewer); | $viewer); | ||||
} | } | ||||
if ($can_use_macros) { | if ($can_use_macros) { | ||||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |