Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98259132
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
Sat, Jan 11, 13:14
Size
1 KB
Mime Type
text/x-php
Expires
Mon, Jan 13, 13:14 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
23546337
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