3 final class ManiphestTaskPoints
extends Phobject
{
5 public static function getIsEnabled() {
6 $config = self
::getPointsConfig();
7 return idx($config, 'enabled');
10 public static function getPointsLabel() {
11 $config = self
::getPointsConfig();
12 return idx($config, 'label', pht('Points'));
15 public static function getPointsActionLabel() {
16 $config = self
::getPointsConfig();
17 return idx($config, 'action', pht('Change Points'));
20 private static function getPointsConfig() {
21 return PhabricatorEnv
::getEnvConfig('maniphest.points');
24 public static function validateConfiguration($config) {
25 if (!is_array($config)) {
28 'Configuration is not valid. Maniphest points configuration must '.
32 PhutilTypeSpec
::checkMap(
35 'enabled' => 'optional bool',
36 'label' => 'optional string',
37 'action' => 'optional string',