Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106762654
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
Mon, Mar 31, 06:22
Size
913 B
Mime Type
text/x-php
Expires
Wed, Apr 2, 06:22 (2 d)
Engine
blob
Format
Raw Data
Handle
25268953
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