Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120983208
ManiphestDefaultTaskExtensions.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, Jul 8, 04:25
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Jul 10, 04:25 (2 d)
Engine
blob
Format
Raw Data
Handle
27274687
Attached To
rPH Phabricator
ManiphestDefaultTaskExtensions.php
View Options
<?php
/**
* @group maniphest
*/
final
class
ManiphestDefaultTaskExtensions
extends
ManiphestTaskExtensions
{
public
function
getAuxiliaryFieldSpecifications
()
{
$fields
=
PhabricatorEnv
::
getEnvConfig
(
'maniphest.custom-fields'
);
$specs
=
array
();
foreach
(
$fields
as
$aux
=>
$info
)
{
$spec
=
new
ManiphestAuxiliaryFieldDefaultSpecification
();
$spec
->
setAuxiliaryKey
(
$aux
);
$spec
->
setLabel
(
idx
(
$info
,
'label'
));
$spec
->
setCaption
(
idx
(
$info
,
'caption'
));
$spec
->
setFieldType
(
idx
(
$info
,
'type'
));
$spec
->
setRequired
(
idx
(
$info
,
'required'
));
$spec
->
setCheckboxLabel
(
idx
(
$info
,
'checkbox-label'
));
$spec
->
setCheckboxValue
(
idx
(
$info
,
'checkbox-value'
,
1
));
if
(
$spec
->
getFieldType
()
==
ManiphestAuxiliaryFieldDefaultSpecification
::
TYPE_SELECT
)
{
$spec
->
setSelectOptions
(
idx
(
$info
,
'options'
));
}
$spec
->
setShouldCopyWhenCreatingSimilarTask
(
idx
(
$info
,
'copy'
));
$spec
->
setDefaultValue
(
idx
(
$info
,
'default'
));
$specs
[]
=
$spec
;
}
return
$specs
;
}
}
Event Timeline
Log In to Comment