Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92661534
PhabricatorApplicationManiphest.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
Fri, Nov 22, 12:44
Size
3 KB
Mime Type
text/x-php
Expires
Sun, Nov 24, 12:44 (1 d, 17 h)
Engine
blob
Format
Raw Data
Handle
22481053
Attached To
rPH Phabricator
PhabricatorApplicationManiphest.php
View Options
<?php
final
class
PhabricatorApplicationManiphest
extends
PhabricatorApplication
{
public
function
getShortDescription
()
{
return
'Tasks and Bugs'
;
}
public
function
getBaseURI
()
{
return
'/maniphest/'
;
}
public
function
getIconName
()
{
return
'maniphest'
;
}
public
function
getApplicationGroup
()
{
return
self
::
GROUP_CORE
;
}
public
function
getApplicationOrder
()
{
return
0.110
;
}
public
function
getFactObjectsForAnalysis
()
{
return
array
(
new
ManiphestTask
(),
);
}
public
function
getEventListeners
()
{
return
array
(
new
ManiphestNameIndexEventListener
(),
new
ManiphestActionMenuEventListener
(),
new
ManiphestHovercardEventListener
(),
);
}
public
function
getRemarkupRules
()
{
return
array
(
new
ManiphestRemarkupRule
(),
);
}
public
function
getRoutes
()
{
return
array
(
'/T(?P<id>[1-9]
\d
*)'
=>
'ManiphestTaskDetailController'
,
'/maniphest/'
=>
array
(
'(?:query/(?P<queryKey>[^/]+)/)?'
=>
'ManiphestTaskListController'
,
'report/(?:(?P<view>
\w
+)/)?'
=>
'ManiphestReportController'
,
'batch/'
=>
'ManiphestBatchEditController'
,
'task/'
=>
array
(
'create/'
=>
'ManiphestTaskEditController'
,
'edit/(?P<id>[1-9]
\d
*)/'
=>
'ManiphestTaskEditController'
,
'descriptionpreview/'
=>
'PhabricatorMarkupPreviewController'
,
),
'transaction/'
=>
array
(
'save/'
=>
'ManiphestTransactionSaveController'
,
'preview/(?P<id>[1-9]
\d
*)/'
=>
'ManiphestTransactionPreviewController'
,
),
'export/(?P<key>[^/]+)/'
=>
'ManiphestExportController'
,
'subpriority/'
=>
'ManiphestSubpriorityController'
,
'subscribe/(?P<action>add|rem)/(?P<id>[1-9]
\d
*)/'
=>
'ManiphestSubscribeController'
,
),
);
}
public
function
loadStatus
(
PhabricatorUser
$user
)
{
$status
=
array
();
$query
=
id
(
new
ManiphestTaskQuery
())
->
setViewer
(
$user
)
->
withStatuses
(
ManiphestTaskStatus
::
getOpenStatusConstants
())
->
withOwners
(
array
(
$user
->
getPHID
()));
$count
=
count
(
$query
->
execute
());
$type
=
PhabricatorApplicationStatusView
::
TYPE_WARNING
;
$status
[]
=
id
(
new
PhabricatorApplicationStatusView
())
->
setType
(
$type
)
->
setText
(
pht
(
'%s Assigned Task(s)'
,
new
PhutilNumber
(
$count
)))
->
setCount
(
$count
);
return
$status
;
}
public
function
getQuickCreateItems
(
PhabricatorUser
$viewer
)
{
$items
=
array
();
$item
=
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Maniphest Task'
))
->
setAppIcon
(
'maniphest-dark'
)
->
setHref
(
$this
->
getBaseURI
().
'task/create/'
);
$items
[]
=
$item
;
return
$items
;
}
protected
function
getCustomCapabilities
()
{
return
array
(
ManiphestCapabilityDefaultView
::
CAPABILITY
=>
array
(
'caption'
=>
pht
(
'Default view policy for newly created tasks.'
),
),
ManiphestCapabilityDefaultEdit
::
CAPABILITY
=>
array
(
'caption'
=>
pht
(
'Default edit policy for newly created tasks.'
),
),
ManiphestCapabilityEditStatus
::
CAPABILITY
=>
array
(
),
ManiphestCapabilityEditAssign
::
CAPABILITY
=>
array
(
),
ManiphestCapabilityEditPolicies
::
CAPABILITY
=>
array
(
),
ManiphestCapabilityEditPriority
::
CAPABILITY
=>
array
(
),
ManiphestCapabilityEditProjects
::
CAPABILITY
=>
array
(
),
ManiphestCapabilityBulkEdit
::
CAPABILITY
=>
array
(
),
);
}
}
Event Timeline
Log In to Comment