Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97237770
PhabricatorApplicationPaste.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, Jan 3, 17:01
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Jan 5, 17:01 (2 d)
Engine
blob
Format
Raw Data
Handle
23361841
Attached To
rPH Phabricator
PhabricatorApplicationPaste.php
View Options
<?php
final
class
PhabricatorApplicationPaste
extends
PhabricatorApplication
{
public
function
getBaseURI
()
{
return
'/paste/'
;
}
public
function
getIconName
()
{
return
'paste'
;
}
public
function
getTitleGlyph
()
{
return
"
\x
E2
\x
9C
\x
8E"
;
}
public
function
getApplicationGroup
()
{
return
self
::
GROUP_UTILITIES
;
}
public
function
getShortDescription
()
{
return
pht
(
'Share Text Snippets'
);
}
public
function
getRemarkupRules
()
{
return
array
(
new
PhabricatorPasteRemarkupRule
(),
);
}
public
function
getRoutes
()
{
return
array
(
'/P(?P<id>[1-9]
\d
*)(?:
\$
(?P<lines>
\d
+(?:-
\d
+)?))?'
=>
'PhabricatorPasteViewController'
,
'/paste/'
=>
array
(
'(query/(?P<queryKey>[^/]+)/)?'
=>
'PhabricatorPasteListController'
,
'create/'
=>
'PhabricatorPasteEditController'
,
'edit/(?P<id>[1-9]
\d
*)/'
=>
'PhabricatorPasteEditController'
,
'comment/(?P<id>[1-9]
\d
*)/'
=>
'PhabricatorPasteCommentController'
,
),
);
}
protected
function
getCustomCapabilities
()
{
return
array
(
PasteCapabilityDefaultView
::
CAPABILITY
=>
array
(
'caption'
=>
pht
(
'Default view policy for newly created pastes.'
)
),
);
}
public
function
getQuickCreateItems
(
PhabricatorUser
$viewer
)
{
$items
=
array
();
$item
=
id
(
new
PHUIListItemView
())
->
setName
(
pht
(
'Paste'
))
->
setIcon
(
'fa-clipboard'
)
->
setHref
(
$this
->
getBaseURI
().
'create/'
);
$items
[]
=
$item
;
return
$items
;
}
}
Event Timeline
Log In to Comment