public static function renderOneObject($object, $field, $viewer, $context_object)
Convenience method for pushing a single object through the markup pipeline.
PhabricatorMarkupInterface | $object | The object to render. |
string | $field | The field to render. |
PhabricatorUser | $viewer | User viewing the markup. |
object | $context_object | A context object for policy checks |
string | Marked up output. |
public function addObject($object, $field)
Queue an object for markup generation when process() is called. You can retrieve the output later with getOutput().
PhabricatorMarkupInterface | $object | The object to render. |
string | $field | The field to render. |
this |
public function process()
Process objects queued with addObject(). You can then retrieve the output with getOutput().
this |
public function getOutput($object, $field)
Get the output of markup processing for a field queued with addObject(). Before you can call this method, you must call process().
PhabricatorMarkupInterface | $object | The object to retrieve. |
string | $field | The field to retrieve. |
string | Processed output. |
public function getEngineMetadata($object, $field, $metadata_key, $default)
Retrieve engine metadata for a given field.
PhabricatorMarkupInterface | $object | The object to retrieve. |
string | $field | The field to retrieve. |
string | $metadata_key | The engine metadata field to retrieve. |
wild | $default | Optional default value. |
wild |
private function requireKeyProcessed($key)
$key |
wild |
private function getMarkupFieldKey($object, $field)
PhabricatorMarkupInterface | $object | |
$field |
wild |
private function loadPreprocessorCaches($engines, $objects)
array | $engines | |
array | $objects |
wild |
public function setViewer($viewer)
Set the viewing user. Used to implement object permissions.
PhabricatorUser | $viewer | The viewing user. |
this |
public function setContextObject($object)
Set the context object. Used to implement object permissions.
The | $object | object in which context this remarkup is used. |
this |
public function setAuxiliaryConfig($key, $value)
$key | ||
$value |
wild |
public static function newManiphestMarkupEngine()
wild |
public static function newPhrictionMarkupEngine()
wild |
public static function newPhameMarkupEngine()
wild |
public static function newFeedMarkupEngine()
wild |
public static function newCalendarMarkupEngine()
wild |
public static function newDifferentialMarkupEngine($options)
array | $options |
wild |
public static function newDiffusionMarkupEngine($options)
array | $options |
wild |
public static function getEngine($ruleset)
$ruleset |
wild |
private static function getMarkupEngineDefaultConfiguration()
wild |
public static function newMarkupEngine($options)
array | $options |
wild |
public static function extractPHIDsFromMentions($viewer, $content_blocks)
PhabricatorUser | $viewer | |
array | $content_blocks |
wild |
public static function extractFilePHIDsFromEmbeddedFiles($viewer, $content_blocks)
PhabricatorUser | $viewer | |
array | $content_blocks |
wild |
public static function summarizeSentence($corpus)
$corpus |
wild |
public static function summarize($corpus)
Produce a corpus summary, in a way that shortens the underlying text without truncating it somewhere awkward.
TODO: We could do a better job of this.
string | $corpus | Remarkup corpus to summarize. |
string | Summarized corpus. |
private static function loadCustomInlineRules()
wild |
private static function loadCustomBlockRules()
wild |
public static function digestRemarkupContent($object, $content)
$object | ||
$content |
wild |