Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2891816
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
1003 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
(
'Availability'
)
;
}
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
(
)
;
// Don't show availability for disabled users, since this is vaguely
// misleading to say "Availability: Available" and probably not useful.
if
(
$user
->
getIsDisabled
(
)
)
{
return
null
;
}
return
id
(
new
PHUIUserAvailabilityView
(
)
)
->
setViewer
(
$viewer
)
->
setAvailableUser
(
$user
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 15:47 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126154
Default Alt Text
PhabricatorUserStatusField.php (1003 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment