Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2893730
PhabricatorProjectColumnPointsOrder.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
919 B
Referenced Files
None
Subscribers
None
PhabricatorProjectColumnPointsOrder.php
View Options
<?php
final
class
PhabricatorProjectColumnPointsOrder
extends
PhabricatorProjectColumnOrder
{
const
ORDERKEY
=
'points'
;
public
function
getDisplayName
(
)
{
return
pht
(
'Sort by Points'
)
;
}
protected
function
newMenuIconIcon
(
)
{
return
'fa-map-pin'
;
}
public
function
isEnabled
(
)
{
return
ManiphestTaskPoints
::
getIsEnabled
(
)
;
}
public
function
getHasHeaders
(
)
{
return
false
;
}
public
function
getCanReorder
(
)
{
return
false
;
}
public
function
getMenuOrder
(
)
{
return
6000
;
}
protected
function
newSortVectorForObject
(
$object
)
{
$points
=
$object
->
getPoints
(
)
;
// Put cards with no points on top.
$has_points
=
(
$points
!==
null
)
;
if
(
!
$has_points
)
{
$overall_order
=
0
;
}
else
{
$overall_order
=
1
;
}
return
array
(
$overall_order
,
-
1.0
*
(double)
$points
,
-
1
*
(int)
$object
->
getID
(
)
,
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 18:58 (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1127622
Default Alt Text
PhabricatorProjectColumnPointsOrder.php (919 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment