Page MenuHomePhorge

HeraldFieldGroup.php
No OneTemporary

Size
877 B
Referenced Files
None
Subscribers
None

HeraldFieldGroup.php

<?php
abstract class HeraldFieldGroup extends Phobject {
abstract public function getGroupLabel();
protected function getGroupOrder() {
return 1000;
}
final public function getGroupKey() {
$class = new ReflectionClass($this);
$const = $class->getConstant('FIELDGROUPKEY');
if ($const === false) {
throw new Exception(
pht(
'"%s" class "%s" must define a "%s" property.',
__CLASS__,
get_class($this),
'FIELDCONST'));
}
return $const;
}
public function getSortKey() {
return sprintf('A%08d%s', $this->getGroupOrder(), $this->getGroupLabel());
}
final public static function getAllFieldGroups() {
return id(new PhutilClassMapQuery())
->setAncestorClass(__CLASS__)
->setUniqueMethod('getGroupKey')
->setSortMethod('getSortKey')
->execute();
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Jun 30, 1:19 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
270116
Default Alt Text
HeraldFieldGroup.php (877 B)

Event Timeline