1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 08:12:40 +01:00
phorge-phorge/src/applications/diffusion/herald/DiffusionCommitDiffContentHeraldField.php
epriestley 98ac0a022c Modularize all Diffusion commit Herald fields
Summary: Ref T8726.

Test Plan:
Created a giant rule with every commit field:

{F594686}

Ran the upgrade, got the same rule with new fields:

{F594688}

Used "Test Console" to run transcripts, saw all the fields populate correctly.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13567
2015-07-07 11:53:17 -07:00

24 lines
530 B
PHP

<?php
final class DiffusionCommitDiffContentHeraldField
extends DiffusionCommitHeraldField {
const FIELDCONST = 'diffusion.commit.diff';
public function getHeraldFieldName() {
return pht('Diff content');
}
public function getHeraldFieldValue($object) {
return $this->getAdapter()->loadDiffContent('*');
}
protected function getHeraldFieldStandardConditions() {
return self::STANDARD_TEXT_MAP;
}
public function getHeraldFieldValueType($condition) {
return HeraldAdapter::VALUE_TEXT;
}
}