Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90827584
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, Nov 5, 03:29
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Nov 7, 03:29 (2 d)
Engine
blob
Format
Raw Data
Handle
22141647
Attached To
rPH Phabricator
PhabricatorToken.php
View Options
<?php
final
class
PhabricatorToken
extends
PhabricatorTokenDAO
implements
PhabricatorPolicyInterface
{
protected
$phid
;
protected
$name
;
protected
$filePHID
;
protected
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_AUX_PHID
=>
true
,
self
::
CONFIG_NO_TABLE
=>
true
,
)
+
parent
::
getConfiguration
();
}
public
function
getCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
);
}
public
function
getPolicy
(
$capability
)
{
return
PhabricatorPolicies
::
getMostOpenPolicy
();
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
return
false
;
}
public
function
describeAutomaticCapability
(
$capability
)
{
return
null
;
}
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
id
(
new
PHUIIconView
())
->
setSpriteSheet
(
PHUIIconView
::
SPRITE_TOKENS
)
->
setSpriteIcon
(
$sprite
);
}
}
Event Timeline
Log In to Comment