Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F568423
PhabricatorUserConfigOptions.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
PhabricatorUserConfigOptions.php
View Options
<?php
final
class
PhabricatorUserConfigOptions
extends
PhabricatorApplicationConfigOptions
{
public
function
getName
()
{
return
pht
(
'User Profiles'
);
}
public
function
getDescription
()
{
return
pht
(
'User profiles configuration.'
);
}
public
function
getIcon
()
{
return
'fa-users'
;
}
public
function
getGroup
()
{
return
'apps'
;
}
public
function
getOptions
()
{
$default
=
array
(
id
(
new
PhabricatorUserRealNameField
())->
getFieldKey
()
=>
true
,
id
(
new
PhabricatorUserTitleField
())->
getFieldKey
()
=>
true
,
id
(
new
PhabricatorUserIconField
())->
getFieldKey
()
=>
true
,
id
(
new
PhabricatorUserSinceField
())->
getFieldKey
()
=>
true
,
id
(
new
PhabricatorUserRolesField
())->
getFieldKey
()
=>
true
,
id
(
new
PhabricatorUserStatusField
())->
getFieldKey
()
=>
true
,
id
(
new
PhabricatorUserBlurbField
())->
getFieldKey
()
=>
true
,
);
foreach
(
$default
as
$key
=>
$enabled
)
{
$default
[
$key
]
=
array
(
'disabled'
=>
!
$enabled
,
);
}
$custom_field_type
=
'custom:PhabricatorCustomFieldConfigOptionType'
;
$fields_description
=
$this
->
deformat
(
pht
(
<<<EOTEXT
List of custom fields for user profiles.
For details on adding new fields, see [[ %s | %s ]] in the
documentation.
EOTEXT
,
PhabricatorEnv
::
getDoclink
(
'Configuring Custom Fields'
),
pht
(
'Configuring Custom Fields'
)));
return
array
(
$this
->
newOption
(
'user.fields'
,
$custom_field_type
,
$default
)
->
setCustomData
(
id
(
new
PhabricatorUser
())->
getCustomFieldBaseClass
())
->
setDescription
(
pht
(
'Select and reorder user profile fields.'
)),
$this
->
newOption
(
'user.custom-field-definitions'
,
'wild'
,
array
())
->
setDescription
(
$fields_description
),
$this
->
newOption
(
'user.require-real-name'
,
'bool'
,
true
)
->
setDescription
(
pht
(
'Always require real name for user profiles.'
))
->
setBoolOptions
(
array
(
pht
(
'Make real names required'
),
pht
(
'Make real names optional'
),
)),
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 13, 1:26 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
114175
Default Alt Text
PhabricatorUserConfigOptions.php (2 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment