[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class PhabricatorUserConfigOptions 4 extends PhabricatorApplicationConfigOptions { 5 6 public function getName() { 7 return pht('User Profiles'); 8 } 9 10 public function getDescription() { 11 return pht('User profiles configuration.'); 12 } 13 14 public function getOptions() { 15 16 $default = array( 17 id(new PhabricatorUserRealNameField())->getFieldKey() => true, 18 id(new PhabricatorUserTitleField())->getFieldKey() => true, 19 id(new PhabricatorUserSinceField())->getFieldKey() => true, 20 id(new PhabricatorUserRolesField())->getFieldKey() => true, 21 id(new PhabricatorUserStatusField())->getFieldKey() => true, 22 id(new PhabricatorUserBlurbField())->getFieldKey() => true, 23 ); 24 25 foreach ($default as $key => $enabled) { 26 $default[$key] = array( 27 'disabled' => !$enabled, 28 ); 29 } 30 31 $custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType'; 32 33 return array( 34 $this->newOption('user.fields', $custom_field_type, $default) 35 ->setCustomData(id(new PhabricatorUser())->getCustomFieldBaseClass()) 36 ->setDescription(pht('Select and reorder user profile fields.')), 37 $this->newOption('user.custom-field-definitions', 'map', array()) 38 ->setDescription(pht('Add new simple fields to user profiles.')), 39 $this->newOption('user.require-real-name', 'bool', true) 40 ->setDescription(pht('Always require real name for user profiles.')) 41 ->setBoolOptions( 42 array( 43 pht('Make real names required'), 44 pht('Make real names optional'), 45 )), 46 ); 47 } 48 49 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |