Differential D13612 Diff 32970 src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/herald/DiffusionPreCommitContentAuthorHeraldField.php
<?php | <?php | ||||
final class DiffusionPreCommitContentAuthorHeraldField | final class DiffusionPreCommitContentAuthorHeraldField | ||||
extends DiffusionPreCommitContentHeraldField { | extends DiffusionPreCommitContentHeraldField { | ||||
const FIELDCONST = 'diffusion.pre.commit.author'; | const FIELDCONST = 'diffusion.pre.commit.author'; | ||||
public function getHeraldFieldName() { | public function getHeraldFieldName() { | ||||
return pht('Author'); | return pht('Author'); | ||||
} | } | ||||
public function getHeraldFieldValue($object) { | public function getHeraldFieldValue($object) { | ||||
return $this->getAdapter()->getAuthorPHID(); | return $this->getAdapter()->getAuthorPHID(); | ||||
} | } | ||||
protected function getHeraldFieldStandardConditions() { | protected function getHeraldFieldStandardType() { | ||||
return self::STANDARD_PHID_NULLABLE; | return self::STANDARD_PHID_NULLABLE; | ||||
} | } | ||||
public function getHeraldFieldValueType($condition) { | public function getHeraldFieldValueType($condition) { | ||||
switch ($condition) { | switch ($condition) { | ||||
case HeraldAdapter::CONDITION_EXISTS: | case HeraldAdapter::CONDITION_EXISTS: | ||||
case HeraldAdapter::CONDITION_NOT_EXISTS: | case HeraldAdapter::CONDITION_NOT_EXISTS: | ||||
return HeraldAdapter::VALUE_NONE; | return HeraldAdapter::VALUE_NONE; | ||||
default: | default: | ||||
return HeraldAdapter::VALUE_USER; | return HeraldAdapter::VALUE_USER; | ||||
} | } | ||||
} | } | ||||
} | } |