mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-08 22:01:03 +01:00
ed3dfd491f
Summary: Ref T8726. Modularize action values. Fully modularize "text", "none" and "select" controls. Only tokenizers remain. Test Plan: - Used all affected value types in UI. - Reviewed rules using new modular rendering, saw sensible output. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8726 Differential Revision: https://secure.phabricator.com/D13614
31 lines
787 B
PHP
31 lines
787 B
PHP
<?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);
|
|
}
|
|
|
|
}
|