Path: blob/master/src/applications/maniphest/constants/ManiphestTaskPoints.php
12256 views
<?php12final class ManiphestTaskPoints extends Phobject {34public static function getIsEnabled() {5$config = self::getPointsConfig();6return idx($config, 'enabled');7}89public static function getPointsLabel() {10$config = self::getPointsConfig();11return idx($config, 'label', pht('Points'));12}1314public static function getPointsActionLabel() {15$config = self::getPointsConfig();16return idx($config, 'action', pht('Change Points'));17}1819private static function getPointsConfig() {20return PhabricatorEnv::getEnvConfig('maniphest.points');21}2223public static function validateConfiguration($config) {24if (!is_array($config)) {25throw new Exception(26pht(27'Configuration is not valid. Maniphest points configuration must '.28'be a dictionary.'));29}3031PhutilTypeSpec::checkMap(32$config,33array(34'enabled' => 'optional bool',35'label' => 'optional string',36'action' => 'optional string',37));38}3940}414243