Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106872719
PhabricatorToken.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
Tue, Apr 1, 21:09
Size
970 B
Mime Type
text/x-php
Expires
Thu, Apr 3, 21:09 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25294007
Attached To
rPH Phabricator
PhabricatorToken.php
View Options
<?php
final
class
PhabricatorToken
extends
PhabricatorTokenDAO
implements
PhabricatorPolicyInterface
{
protected
$phid
;
protected
$name
;
protected
$filePHID
;
public
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_AUX_PHID
=>
true
,
)
+
parent
::
getConfiguration
();
}
public
function
getCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
);
}
public
function
getPolicy
(
$capability
)
{
return
PhabricatorPolicies
::
POLICY_USER
;
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
return
false
;
}
public
function
renderIcon
()
{
// TODO: Maybe move to a View class?
require_celerity_resource
(
'sprite-tokens-css'
);
require_celerity_resource
(
'tokens-css'
);
$sprite
=
substr
(
$this
->
getPHID
(),
10
);
return
phutil_tag
(
'div'
,
array
(
'class'
=>
'sprite-tokens token-icon token-'
.
$sprite
,
),
''
);
}
}
Event Timeline
Log In to Comment