Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120050565
PhrequentUserTime.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, Jul 1, 14:43
Size
913 B
Mime Type
text/x-php
Expires
Thu, Jul 3, 14:43 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27131597
Attached To
rPH Phabricator
PhrequentUserTime.php
View Options
<?php
/**
* @group phrequent
*/
final
class
PhrequentUserTime
extends
PhrequentDAO
implements
PhabricatorPolicyInterface
{
protected
$userPHID
;
protected
$objectPHID
;
protected
$note
;
protected
$dateStarted
;
protected
$dateEnded
;
public
function
getCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
);
}
public
function
getPolicy
(
$capability
)
{
$policy
=
PhabricatorPolicies
::
POLICY_NOONE
;
switch
(
$capability
)
{
case
PhabricatorPolicyCapability
::
CAN_VIEW
:
$policy
=
PhabricatorPolicies
::
POLICY_USER
;
break
;
}
return
$policy
;
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
return
(
$viewer
->
getPHID
()
==
$this
->
getUserPHID
());
}
public
function
describeAutomaticCapability
(
$capability
)
{
return
pht
(
'The user who tracked time can always view it.'
);
}
}
Event Timeline
Log In to Comment