Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92219275
DifferentialDefaultFieldSelector.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
Mon, Nov 18, 11:16
Size
2 KB
Mime Type
text/x-php
Expires
Wed, Nov 20, 11:16 (2 d)
Engine
blob
Format
Raw Data
Handle
22393397
Attached To
rPH Phabricator
DifferentialDefaultFieldSelector.php
View Options
<?php
final
class
DifferentialDefaultFieldSelector
extends
DifferentialFieldSelector
{
public
function
getFieldSpecifications
()
{
$fields
=
array
(
new
DifferentialTitleFieldSpecification
(),
new
DifferentialSummaryFieldSpecification
(),
new
DifferentialTestPlanFieldSpecification
(),
new
DifferentialRevisionStatusFieldSpecification
(),
new
DifferentialAuthorFieldSpecification
(),
new
DifferentialReviewersFieldSpecification
(),
new
DifferentialReviewedByFieldSpecification
(),
new
DifferentialCCsFieldSpecification
(),
new
DifferentialLintFieldSpecification
(),
new
DifferentialUnitFieldSpecification
(),
new
DifferentialCommitsFieldSpecification
(),
new
DifferentialDependsOnFieldSpecification
(),
new
DifferentialDependenciesFieldSpecification
(),
new
DifferentialManiphestTasksFieldSpecification
(),
new
DifferentialHostFieldSpecification
(),
new
DifferentialPathFieldSpecification
(),
new
DifferentialBranchFieldSpecification
(),
new
DifferentialArcanistProjectFieldSpecification
(),
new
DifferentialApplyPatchFieldSpecification
(),
new
DifferentialRevisionIDFieldSpecification
(),
new
DifferentialGitSVNIDFieldSpecification
(),
new
DifferentialConflictsFieldSpecification
(),
new
DifferentialDateModifiedFieldSpecification
(),
new
DifferentialDateCreatedFieldSpecification
(),
new
DifferentialAuditorsFieldSpecification
(),
);
return
$fields
;
}
public
function
sortFieldsForRevisionList
(
array
$fields
)
{
assert_instances_of
(
$fields
,
'DifferentialFieldSpecification'
);
$map
=
array
();
foreach
(
$fields
as
$field
)
{
$map
[
get_class
(
$field
)]
=
$field
;
}
$map
=
array_select_keys
(
$map
,
array
(
'DifferentialRevisionIDFieldSpecification'
,
'DifferentialTitleFieldSpecification'
,
'DifferentialRevisionStatusFieldSpecification'
,
'DifferentialAuthorFieldSpecification'
,
'DifferentialReviewersFieldSpecification'
,
'DifferentialDateModifiedFieldSpecification'
,
'DifferentialDateCreatedFieldSpecification'
,
))
+
$map
;
return
array_values
(
$map
);
}
public
function
sortFieldsForMail
(
array
$fields
)
{
assert_instances_of
(
$fields
,
'DifferentialFieldSpecification'
);
$map
=
array
();
foreach
(
$fields
as
$field
)
{
$map
[
get_class
(
$field
)]
=
$field
;
}
$map
=
array_select_keys
(
$map
,
array
(
'DifferentialReviewersFieldSpecification'
,
'DifferentialSummaryFieldSpecification'
,
'DifferentialTestPlanFieldSpecification'
,
'DifferentialRevisionIDFieldSpecification'
,
'DifferentialManiphestTasksFieldSpecification'
,
'DifferentialBranchFieldSpecification'
,
'DifferentialArcanistProjectFieldSpecification'
,
'DifferentialCommitsFieldSpecification'
,
))
+
$map
;
return
array_values
(
$map
);
}
}
Event Timeline
Log In to Comment