Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
980 B · 47 lines
PHP
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748<?php
abstract class PhabricatorInlineCommentContentState extends Phobject {
private $contentText = '';
public function setContentText($content_text) { $this->contentText = $content_text; return $this; }
public function getContentText() { return $this->contentText; }
public function isEmptyContentState() { return !strlen($this->getContentText()); }
public function writeStorageMap() { return array( 'text' => $this->getContentText(), ); }
public function readStorageMap(array $map) { $text = (string)idx($map, 'text'); $this->setContentText($text);
return $this; }
final public function readFromRequest(AphrontRequest $request) { $map = $this->newStorageMapFromRequest($request); return $this->readStorageMap($map); }
protected function newStorageMapFromRequest(AphrontRequest $request) { $map = array();
$map['text'] = (string)$request->getStr('text');
return $map; }
}