Page MenuHomec4science

DifferentialDiffAuthorProjectsHeraldField.php
No OneTemporary

File Metadata

Created
Sat, Jan 4, 19:50

DifferentialDiffAuthorProjectsHeraldField.php

<?php
final class DifferentialDiffAuthorProjectsHeraldField
extends DifferentialDiffHeraldField {
const FIELDCONST = 'differential.diff.author.projects';
public function getHeraldFieldName() {
return pht("Author's projects");
}
public function getHeraldFieldValue($object) {
return PhabricatorEdgeQuery::loadDestinationPHIDs(
$object->getAuthorPHID(),
PhabricatorProjectMemberOfProjectEdgeType::EDGECONST);
}
protected function getHeraldFieldStandardType() {
return self::STANDARD_PHID_LIST;
}
public function getHeraldFieldValueType($condition) {
switch ($condition) {
case HeraldAdapter::CONDITION_EXISTS:
case HeraldAdapter::CONDITION_NOT_EXISTS:
return HeraldAdapter::VALUE_NONE;
default:
return HeraldAdapter::VALUE_PROJECT;
}
}
}

Event Timeline