Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93139314
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
Tue, Nov 26, 12:21
Size
1016 B
Mime Type
text/x-php
Expires
Thu, Nov 28, 12:21 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
22580953
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