Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F17826831
PhabricatorUserIconField.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorUserIconField.php
View Options
<?php
final
class
PhabricatorUserIconField
extends
PhabricatorUserCustomField
{
private
$value
;
public
function
getFieldKey
()
{
return
'user:icon'
;
}
public
function
getFieldName
()
{
return
pht
(
'Icon'
);
}
public
function
getFieldDescription
()
{
return
pht
(
'User icon to accompany their title.'
);
}
public
function
canDisableField
()
{
return
false
;
}
public
function
shouldAppearInApplicationTransactions
()
{
return
true
;
}
public
function
shouldAppearInEditView
()
{
return
true
;
}
public
function
readValueFromObject
(
PhabricatorCustomFieldInterface
$object
)
{
$this
->
value
=
$object
->
loadUserProfile
()->
getIcon
();
}
public
function
getOldValueForApplicationTransactions
()
{
return
$this
->
getObject
()->
loadUserProfile
()->
getIcon
();
}
public
function
getNewValueForApplicationTransactions
()
{
return
$this
->
value
;
}
public
function
applyApplicationTransactionInternalEffects
(
PhabricatorApplicationTransaction
$xaction
)
{
$this
->
getObject
()->
loadUserProfile
()->
setIcon
(
$xaction
->
getNewValue
());
}
public
function
readValueFromRequest
(
AphrontRequest
$request
)
{
$this
->
value
=
$request
->
getStr
(
$this
->
getFieldKey
());
}
public
function
renderEditControl
(
array
$handles
)
{
return
id
(
new
PHUIFormIconSetControl
())
->
setName
(
$this
->
getFieldKey
())
->
setValue
(
$this
->
value
)
->
setLabel
(
$this
->
getFieldName
())
->
setIconSet
(
new
PhabricatorPeopleIconSet
());
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jul 28, 7:39 AM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8228912
Default Alt Text
PhabricatorUserIconField.php (1 KB)
Attached To
Mode
rP Phabricator
Attached
Detach File
Event Timeline
Log In to Comment