mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 10:22:42 +01:00
76880916d0
Summary: Pholio mocks are now embed in a fancy way Test Plan: {F34804} Reviewers: epriestley Reviewed By: epriestley CC: chad, aran, Korvin, AnhNhan Maniphest Tasks: T2626 Differential Revision: https://secure.phabricator.com/D5249
27 lines
599 B
PHP
27 lines
599 B
PHP
<?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)
|
|
->needImages(true)
|
|
->needTokenCounts(true)
|
|
->withIDs($ids)
|
|
->execute();
|
|
}
|
|
|
|
protected function renderObjectEmbed($object, $handle, $options) {
|
|
$embed_mock = id(new PholioMockEmbedView())
|
|
->setMock($object);
|
|
|
|
return $embed_mock->render();
|
|
}
|
|
|
|
}
|