Page MenuHomec4science

DiffusionCommitRepositoryProjectsHeraldField.php
No OneTemporary

File Metadata

Created
Tue, Nov 12, 06:09

DiffusionCommitRepositoryProjectsHeraldField.php

<?php
final class DiffusionCommitRepositoryProjectsHeraldField
extends DiffusionCommitHeraldField {
const FIELDCONST = 'diffusion.commit.repository.projects';
public function getHeraldFieldName() {
return pht('Repository projects');
}
public function getHeraldFieldValue($object) {
return PhabricatorEdgeQuery::loadDestinationPHIDs(
$object->getRepository()->getPHID(),
PhabricatorProjectObjectHasProjectEdgeType::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