You are here

public function ProfileField::fields in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/user/src/Plugin/migrate/source/ProfileField.php \Drupal\user\Plugin\migrate\source\ProfileField::fields()

Returns available fields on the source.

Return value

array Available fields in the source, keys are the field machine names as used in field mappings, values are descriptions.

Overrides MigrateSourceInterface::fields

2 calls to ProfileField::fields()
ProfileFieldOptionTranslation::fields in core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php
Returns available fields on the source.
ProfileFieldTranslation::fields in core/modules/config_translation/src/Plugin/migrate/source/d6/ProfileFieldTranslation.php
Returns available fields on the source.
2 methods override ProfileField::fields()
ProfileFieldOptionTranslation::fields in core/modules/user/src/Plugin/migrate/source/d6/ProfileFieldOptionTranslation.php
Returns available fields on the source.
ProfileFieldTranslation::fields in core/modules/config_translation/src/Plugin/migrate/source/d6/ProfileFieldTranslation.php
Returns available fields on the source.

File

core/modules/user/src/Plugin/migrate/source/ProfileField.php, line 74

Class

ProfileField
Profile field source from database.

Namespace

Drupal\user\Plugin\migrate\source

Code

public function fields() {
  return [
    'fid' => $this
      ->t('Primary Key: Unique profile field ID.'),
    'title' => $this
      ->t('Title of the field shown to the end user.'),
    'name' => $this
      ->t('Internal name of the field used in the form HTML and URLs.'),
    'explanation' => $this
      ->t('Explanation of the field to end users.'),
    'category' => $this
      ->t('Profile category that the field will be grouped under.'),
    'page' => $this
      ->t("Title of page used for browsing by the field's value"),
    'type' => $this
      ->t('Type of form field.'),
    'weight' => $this
      ->t('Weight of field in relation to other profile fields.'),
    'required' => $this
      ->t('Whether the user is required to enter a value. (0 = no, 1 = yes)'),
    'register' => $this
      ->t('Whether the field is visible in the user registration form. (1 = yes, 0 = no)'),
    'visibility' => $this
      ->t('The level of visibility for the field. (0 = hidden, 1 = private, 2 = public on profile but not member list pages, 3 = public on profile and list pages)'),
    'autocomplete' => $this
      ->t('Whether form auto-completion is enabled. (0 = disabled, 1 = enabled)'),
    'options' => $this
      ->t('List of options to be used in a list selection field.'),
  ];
}