Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3493405
PhabricatorUserStatusField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
925 B
Referenced Files
None
Subscribers
None
PhabricatorUserStatusField.php
View Options
<?php
final
class
PhabricatorUserStatusField
extends
PhabricatorUserCustomField
{
private
$value
;
public
function
getFieldKey
(
)
{
return
'user:status'
;
}
public
function
getFieldName
(
)
{
return
pht
(
'Status'
)
;
}
public
function
getFieldDescription
(
)
{
return
pht
(
'Shows when a user is away or busy.'
)
;
}
public
function
shouldAppearInPropertyView
(
)
{
return
true
;
}
public
function
isFieldEnabled
(
)
{
return
PhabricatorApplication
::
isClassInstalled
(
'PhabricatorCalendarApplication'
)
;
}
public
function
renderPropertyViewValue
(
array
$handles
)
{
$user
=
$this
->
getObject
(
)
;
$viewer
=
$this
->
requireViewer
(
)
;
$statuses
=
id
(
new
PhabricatorCalendarEvent
(
)
)
->
loadCurrentStatuses
(
array
(
$user
->
getPHID
(
)
)
)
;
if
(
!
$statuses
)
{
return
pht
(
'Available'
)
;
}
$status
=
head
(
$statuses
)
;
return
$status
->
getTerseSummary
(
$viewer
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Apr 17, 06:41 (13 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1216516
Default Alt Text
PhabricatorUserStatusField.php (925 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment