1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-16 16:58:38 +01:00
phorge-phorge/src/applications/diffusion/remarkup/DiffusionRepositoryRemarkupRule.php

26 lines
526 B
PHP
Raw Normal View History

<?php
final class DiffusionRepositoryRemarkupRule
extends PhabricatorRemarkupRuleObject {
protected function getObjectNamePrefix() {
return 'r';
}
protected function getObjectIDPattern() {
return '[A-Z]+';
}
protected function loadObjects(array $ids) {
$viewer = $this->getEngine()->getConfig('viewer');
$repositories = id(new PhabricatorRepositoryQuery())
->setViewer($viewer)
->withCallsigns($ids)
->execute();
return mpull($repositories, null, 'getCallsign');
}
}