function UserHooks::entityExtraFieldInfo

Same name and namespace in other branches
  1. 11.x core/modules/user/src/Hook/UserHooks.php \Drupal\user\Hook\UserHooks::entityExtraFieldInfo()

Implements hook_entity_extra_field_info().

Attributes

#[Hook('entity_extra_field_info')]

File

core/modules/user/src/Hook/UserHooks.php, line 111

Class

UserHooks
Hook implementations for user.

Namespace

Drupal\user\Hook

Code

public function entityExtraFieldInfo() : array {
  $fields['user']['user']['form']['account'] = [
    'label' => $this->t('User name and password'),
    'description' => $this->t('User module account form elements.'),
    'weight' => -10,
  ];
  $fields['user']['user']['form']['language'] = [
    'label' => $this->t('Language settings'),
    'description' => $this->t('User module form element.'),
    'weight' => 0,
  ];
  if (\Drupal::config('system.date')->get('timezone.user.configurable')) {
    $fields['user']['user']['form']['timezone'] = [
      'label' => $this->t('Timezone'),
      'description' => $this->t('System module form element.'),
      'weight' => 6,
    ];
  }
  $fields['user']['user']['display']['member_for'] = [
    'label' => $this->t('Member for'),
    'description' => $this->t("User module 'member for' view element."),
    'weight' => 5,
  ];
  return $fields;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.