mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 19:32:40 +01:00
30 lines
572 B
PHP
30 lines
572 B
PHP
|
<?php
|
||
|
|
||
|
final class DiffusionRepositoryByIDRemarkupRule
|
||
|
extends PhabricatorObjectRemarkupRule {
|
||
|
|
||
|
protected function getObjectNamePrefix() {
|
||
|
return 'R';
|
||
|
}
|
||
|
|
||
|
protected function getObjectIDPattern() {
|
||
|
return '[0-9]+';
|
||
|
}
|
||
|
|
||
|
public function getPriority() {
|
||
|
return 460.0;
|
||
|
}
|
||
|
|
||
|
protected function loadObjects(array $ids) {
|
||
|
$viewer = $this->getEngine()->getConfig('viewer');
|
||
|
|
||
|
$repos = id(new PhabricatorRepositoryQuery())
|
||
|
->setViewer($viewer)
|
||
|
->withIdentifiers($ids);
|
||
|
|
||
|
$repos->execute();
|
||
|
return $repos->getIdentifierMap();
|
||
|
}
|
||
|
|
||
|
}
|