2013-02-26 23:59:31 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PholioRemarkupRule
|
|
|
|
extends PhabricatorRemarkupRuleObject {
|
|
|
|
|
|
|
|
protected function getObjectNamePrefix() {
|
|
|
|
return 'M';
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function loadObjects(array $ids) {
|
|
|
|
$viewer = $this->getEngine()->getConfig('viewer');
|
|
|
|
return id(new PholioMockQuery())
|
|
|
|
->setViewer($viewer)
|
2013-03-07 17:23:40 +01:00
|
|
|
->needImages(true)
|
|
|
|
->needTokenCounts(true)
|
2013-02-26 23:59:31 +01:00
|
|
|
->withIDs($ids)
|
|
|
|
->execute();
|
|
|
|
}
|
|
|
|
|
2013-03-07 17:23:40 +01:00
|
|
|
protected function renderObjectEmbed($object, $handle, $options) {
|
|
|
|
$embed_mock = id(new PholioMockEmbedView())
|
|
|
|
->setMock($object);
|
|
|
|
|
|
|
|
return $embed_mock->render();
|
|
|
|
}
|
|
|
|
|
2013-02-26 23:59:31 +01:00
|
|
|
}
|