public function ExtraFieldManager::extraFieldInfo in Account field split 8
Same name and namespace in other branches
- 2.x src/ExtraFieldManager.php \Drupal\account_field_split\ExtraFieldManager::extraFieldInfo()
Return list of extra fields.
Return value
array Array of extra fields description.
File
- src/
ExtraFieldManager.php, line 41
Class
- ExtraFieldManager
- Class ExtraFieldManager.
Namespace
Drupal\account_field_splitCode
public function extraFieldInfo() {
$extra = [];
$fields = [
'mail' => 'E-mail address',
'name' => 'Username',
'pass' => 'Password',
'status' => 'Status',
'roles' => 'Roles',
'notify' => 'Notify user about new account',
'current_pass' => 'Current password',
];
$description = $this
->t('User profile element');
foreach ($fields as $field => $label) {
$extra['user']['user']['form'][$field] = [
'label' => $label,
'description' => $description,
'weight' => 0,
'visible' => TRUE,
];
}
return $extra;
}