Path: blob/master/src/applications/herald/value/HeraldFieldValue.php
12256 views
<?php12abstract class HeraldFieldValue extends Phobject {34private $viewer;56const CONTROL_NONE = 'herald.control.none';7const CONTROL_TEXT = 'herald.control.text';8const CONTROL_SELECT = 'herald.control.select';9const CONTROL_TOKENIZER = 'herald.control.tokenizer';10const CONTROL_REMARKUP = 'herald.control.remarkup';1112abstract public function getFieldValueKey();13abstract public function getControlType();14abstract public function renderFieldValue($value);15abstract public function renderEditorValue($value);1617public function setViewer(PhabricatorUser $viewer) {18$this->viewer = $viewer;19return $this;20}2122public function getViewer() {23return $this->viewer;24}2526final public function getControlSpecificationDictionary() {27return array(28'key' => $this->getFieldValueKey(),29'control' => $this->getControlType(),30'template' => $this->getControlTemplate(),31);32}3334protected function getControlTemplate() {35return array();36}3738public function renderTranscriptValue($value) {39return $this->renderFieldValue($value);40}4142}434445