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/differential/herald/DifferentialRevisionRepositoryHeraldField.php

31 lines
629 B
PHP
Raw Normal View History

<?php
final class DifferentialRevisionRepositoryHeraldField
extends DifferentialRevisionHeraldField {
const FIELDCONST = 'differential.revision.repository';
public function getHeraldFieldName() {
return pht('Repository');
}
public function getHeraldFieldValue($object) {
$repository = $this->getAdapter()->loadRepository();
if (!$repository) {
return null;
}
return $repository->getPHID();
}
protected function getHeraldFieldStandardType() {
return self::STANDARD_PHID_NULLABLE;
}
protected function getDatasource() {
return new DiffusionRepositoryDatasource();
}
}