Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102025008
ManiphestTaskPoints.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 16, 08:00
Size
1016 B
Mime Type
text/x-php
Expires
Tue, Feb 18, 08:00 (2 d)
Engine
blob
Format
Raw Data
Handle
24216137
Attached To
rPH Phabricator
ManiphestTaskPoints.php
View Options
<?php
final
class
ManiphestTaskPoints
extends
Phobject
{
public
static
function
getIsEnabled
()
{
$config
=
self
::
getPointsConfig
();
return
idx
(
$config
,
'enabled'
);
}
public
static
function
getPointsLabel
()
{
$config
=
self
::
getPointsConfig
();
return
idx
(
$config
,
'label'
,
pht
(
'Points'
));
}
public
static
function
getPointsActionLabel
()
{
$config
=
self
::
getPointsConfig
();
return
idx
(
$config
,
'action'
,
pht
(
'Change Points'
));
}
private
static
function
getPointsConfig
()
{
return
PhabricatorEnv
::
getEnvConfig
(
'maniphest.points'
);
}
public
static
function
validateConfiguration
(
$config
)
{
if
(!
is_array
(
$config
))
{
throw
new
Exception
(
pht
(
'Configuration is not valid. Maniphest points configuration must '
.
'be a dictionary.'
));
}
PhutilTypeSpec
::
checkMap
(
$config
,
array
(
'enabled'
=>
'optional bool'
,
'label'
=>
'optional string'
,
'action'
=>
'optional string'
,
));
}
}
Event Timeline
Log In to Comment