mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 03:12:41 +01:00
161ebad56d
Summary: Ref T9964. Three goals here: - Make it easier to supply Conduit documentation. - Make automatic documentation for `*.edit` endpoints more complete, particularly for custom fields. - Allow type resolution via Conduit types, so you can pass `["alincoln"]` to "subscribers" instead of needing to use PHIDs. Test Plan: - Viewed and used all search and edit endpoints, including custom fields. - Used parameter type resolution to set subscribers to user "dog" instead of "PHID-USER-whatever". - Viewed HTTP parameter documentation. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9964 Differential Revision: https://secure.phabricator.com/D14796
46 lines
864 B
PHP
46 lines
864 B
PHP
<?php
|
|
|
|
final class PhabricatorTextAreaEditField
|
|
extends PhabricatorEditField {
|
|
|
|
private $monospaced;
|
|
private $height;
|
|
|
|
public function setMonospaced($monospaced) {
|
|
$this->monospaced = $monospaced;
|
|
return $this;
|
|
}
|
|
|
|
public function getMonospaced() {
|
|
return $this->monospaced;
|
|
}
|
|
|
|
public function setHeight($height) {
|
|
$this->height = $height;
|
|
return $this;
|
|
}
|
|
|
|
public function getHeight() {
|
|
return $this->height;
|
|
}
|
|
|
|
protected function newControl() {
|
|
$control = new AphrontFormTextAreaControl();
|
|
|
|
if ($this->getMonospaced()) {
|
|
$control->setCustomClass('PhabricatorMonospaced');
|
|
}
|
|
|
|
$height = $this->getHeight();
|
|
if ($height) {
|
|
$control->setHeight($height);
|
|
}
|
|
|
|
return $control;
|
|
}
|
|
|
|
protected function newConduitParameterType() {
|
|
return new ConduitStringParameterType();
|
|
}
|
|
|
|
}
|