Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F568319
PhabricatorUserSinceField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
756 B
Referenced Files
None
Subscribers
None
PhabricatorUserSinceField.php
View Options
<?php
final
class
PhabricatorUserSinceField
extends
PhabricatorUserCustomField
{
private
$value
;
public
function
getFieldKey
()
{
return
'user:since'
;
}
public
function
getFieldName
()
{
return
pht
(
'User Since'
);
}
public
function
getFieldDescription
()
{
return
pht
(
'Shows user join date.'
);
}
public
function
shouldAppearInPropertyView
()
{
return
true
;
}
public
function
renderPropertyViewValue
(
array
$handles
)
{
$absolute
=
phabricator_datetime
(
$this
->
getObject
()->
getDateCreated
(),
$this
->
getViewer
());
$relative
=
phutil_format_relative_time_detailed
(
time
()
-
$this
->
getObject
()->
getDateCreated
(),
$levels
=
2
);
return
hsprintf
(
'%s (%s)'
,
$absolute
,
$relative
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 1:22 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
124431
Default Alt Text
PhabricatorUserSinceField.php (756 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment