Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/field/HeraldField.php
Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | abstract class HeraldField extends Phobject { | ||||
final public static function getAllFields() { | final public static function getAllFields() { | ||||
return id(new PhutilClassMapQuery()) | return id(new PhutilClassMapQuery()) | ||||
->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
->setUniqueMethod('getFieldConstant') | ->setUniqueMethod('getFieldConstant') | ||||
->execute(); | ->execute(); | ||||
} | } | ||||
final protected function hasAppliedTransactionOfType($type) { | |||||
$xactions = $this->getAdapter()->getAppliedTransactions(); | |||||
if (!$xactions) { | |||||
return false; | |||||
} | |||||
foreach ($xactions as $xaction) { | |||||
if ($xaction->getTransactionType() === $type) { | |||||
return true; | |||||
} | |||||
} | |||||
return false; | |||||
} | |||||
} | } |