1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-24 13:38:19 +01:00
phorge-phorge/src/applications/diffusion/herald/DiffusionPreCommitRefChangeHeraldField.php

32 lines
787 B
PHP
Raw Normal View History

<?php
final class DiffusionPreCommitRefChangeHeraldField
extends DiffusionPreCommitRefHeraldField {
const FIELDCONST = 'diffusion.pre.ref.change';
public function getHeraldFieldName() {
return pht('Ref change type');
}
public function getHeraldFieldValue($object) {
return $object->getChangeFlags();
}
public function getHeraldFieldConditions() {
return array(
HeraldAdapter::CONDITION_HAS_BIT,
HeraldAdapter::CONDITION_NOT_BIT,
);
}
public function getHeraldFieldValueType($condition) {
return id(new HeraldSelectFieldValue())
->setKey(self::FIELDCONST)
->setOptions(
PhabricatorRepositoryPushLog::getHeraldChangeFlagConditionOptions())
->setDefault(PhabricatorRepositoryPushLog::CHANGEFLAG_ADD);
}
}