Page MenuHomec4science

DifferentialRevisionAuthorProjectsHeraldField.php
No OneTemporary

File Metadata

Created
Wed, Jan 8, 02:47

DifferentialRevisionAuthorProjectsHeraldField.php

<?php
final class DifferentialRevisionAuthorProjectsHeraldField
extends DifferentialRevisionHeraldField {
const FIELDCONST = 'differential.revision.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