1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-01 11:12:42 +01:00
phorge-phorge/src/applications/paste/remarkup/PhabricatorPasteRemarkupRule.php

33 lines
638 B
PHP
Raw Normal View History

<?php
/**
* @group markup
*/
final class PhabricatorPasteRemarkupRule
extends PhabricatorRemarkupRuleObject {
protected function getObjectNamePrefix() {
return 'P';
}
protected function loadObjects(array $ids) {
$viewer = $this->getEngine()->getConfig('viewer');
return id(new PhabricatorPasteQuery())
->setViewer($viewer)
->withIDs($ids)
->needContent(true)
->execute();
}
protected function renderObjectEmbed($object, $handle, $options) {
$embed_paste = id(new PasteEmbedView())
->setPaste($object)
->setHandle($handle);
return $embed_paste->render();
}
}