Compare commits

...

2 Commits

Author SHA1 Message Date
d3c1282e47 Adiciona campo field_user_mathscinetid ao módulo
Inclui config/install com langcode en, update hook 10008 para sites
já instalados e tradução pt-br do label e descrição do campo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 08:13:32 -03:00
3597de7220 Adiciona campo field_person_id com langcode en e tradução pt-br
Inclui field.storage e field.field para o campo Institutional ID,
com tradução 'Id Institucional' em config/translations/pt-br/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 13:27:57 -03:00
7 changed files with 133 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
langcode: en
status: true
dependencies:
config:
- field.storage.user.field_user_mathscinetid
module:
- user
id: user.user.field_user_mathscinetid
field_name: field_user_mathscinetid
entity_type: user
bundle: user
label: 'MathSciNet ID'
description: 'MathSciNet identifier of the researcher.'
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings:
min: null
max: null
prefix: ''
suffix: ''
field_type: integer

View File

@@ -0,0 +1,19 @@
langcode: en
status: true
dependencies:
module:
- user
id: user.field_user_mathscinetid
field_name: field_user_mathscinetid
entity_type: user
type: integer
settings:
unsigned: false
size: normal
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@@ -0,0 +1,19 @@
langcode: en
status: true
dependencies:
config:
- field.storage.user.field_person_id
module:
- user
id: user.user.field_person_id
field_name: field_person_id
entity_type: user
bundle: user
label: 'Institutional ID'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string

View File

@@ -0,0 +1,20 @@
langcode: en
status: true
dependencies:
module:
- user
id: user.field_person_id
field_name: field_person_id
entity_type: user
type: string
settings:
max_length: 255
case_sensitive: false
is_ascii: false
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false

View File

@@ -0,0 +1 @@
label: 'Id Institucional'

View File

@@ -508,6 +508,46 @@ function site_users_update_10007() {
return t('field_user_id_lattes alterado para BIGINT para suportar IDs Lattes de 16 dígitos.'); return t('field_user_id_lattes alterado para BIGINT para suportar IDs Lattes de 16 dígitos.');
} }
/**
* Adds the field_user_mathscinetid field for researcher MathSciNet ID.
*/
function site_users_update_10008() {
// Create field storage if it does not exist.
if (!FieldStorageConfig::loadByName('user', 'field_user_mathscinetid')) {
FieldStorageConfig::create([
'field_name' => 'field_user_mathscinetid',
'entity_type' => 'user',
'type' => 'integer',
'settings' => [
'unsigned' => FALSE,
'size' => 'normal',
],
'cardinality' => 1,
'translatable' => TRUE,
])->save();
}
// Create field instance if it does not exist.
if (!FieldConfig::loadByName('user', 'user', 'field_user_mathscinetid')) {
FieldConfig::create([
'field_name' => 'field_user_mathscinetid',
'entity_type' => 'user',
'bundle' => 'user',
'label' => 'MathSciNet ID',
'description' => 'MathSciNet identifier of the researcher.',
'required' => FALSE,
'settings' => [
'min' => NULL,
'max' => NULL,
'prefix' => '',
'suffix' => '',
],
])->save();
}
return t('MathSciNet ID field created successfully.');
}
/** /**
* Corrige mapeamentos LDAP com campos de string nulos na config ativa. * Corrige mapeamentos LDAP com campos de string nulos na config ativa.
*/ */

View File

@@ -171,3 +171,14 @@ msgstr "Este usuário não tornou seu perfil público."
# Template # Template
msgid "Phone:" msgid "Phone:"
msgstr "Telefone:" msgstr "Telefone:"
# Field labels - field_user_mathscinetid
msgid "MathSciNet ID"
msgstr "ID MathSciNet"
msgid "MathSciNet identifier of the researcher."
msgstr "Identificador MathSciNet do pesquisador."
# Install/update - field_user_mathscinetid
msgid "MathSciNet ID field created successfully."
msgstr "Campo ID MathSciNet criado com sucesso."