Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/export/format/PhabricatorExportFormat.php
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | abstract class PhabricatorExportFormat | ||||
final public static function getAllExportFormats() { | final public static function getAllExportFormats() { | ||||
return id(new PhutilClassMapQuery()) | return id(new PhutilClassMapQuery()) | ||||
->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
->setUniqueMethod('getExportFormatKey') | ->setUniqueMethod('getExportFormatKey') | ||||
->execute(); | ->execute(); | ||||
} | } | ||||
final public static function getAllEnabledExportFormats() { | |||||
$formats = self::getAllExportFormats(); | |||||
foreach ($formats as $key => $format) { | |||||
if (!$format->isExportFormatEnabled()) { | |||||
unset($formats[$key]); | |||||
} | |||||
} | |||||
return $formats; | |||||
} | |||||
} | } |