Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102367130
PhabricatorUserStatusField.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
Wed, Feb 19, 23:39
Size
794 B
Mime Type
text/x-php
Expires
Fri, Feb 21, 23:39 (2 d)
Engine
blob
Format
Raw Data
Handle
24339832
Attached To
rPH Phabricator
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
();
return
id
(
new
PHUIUserAvailabilityView
())
->
setViewer
(
$viewer
)
->
setAvailableUser
(
$user
);
}
}
Event Timeline
Log In to Comment