feat: Remove field_user_category (gerenciado em outro módulo)

Remove os arquivos de config field.storage, field.field e translation
referentes ao field_user_category, e elimina todas as referências
ao campo em site_users.module, site_users.install e UserInfoBlock.php.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-23 13:47:34 -03:00
parent aac6256b27
commit 1dafd4a865
6 changed files with 2 additions and 69 deletions

View File

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

View File

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

View File

@@ -1,2 +0,0 @@
label: Categoria
description: 'Categoria do usuário.'

View File

@@ -42,19 +42,6 @@ function site_users_install() {
]);
}
// Campo Categoria.
if (!$form_display->getComponent('field_user_category')) {
$form_display->setComponent('field_user_category', [
'type' => 'string_textfield',
'weight' => 12,
'settings' => [
'size' => 60,
'placeholder' => '',
],
'region' => 'content',
]);
}
// Campo Fotos - Media Library widget.
if (!$form_display->getComponent('field_user_photos')) {
$form_display->setComponent('field_user_photos', [
@@ -115,19 +102,6 @@ function site_users_install() {
]);
}
// Campo Categoria.
if (!$view_display->getComponent('field_user_category')) {
$view_display->setComponent('field_user_category', [
'type' => 'string',
'weight' => 12,
'label' => 'above',
'settings' => [
'link_to_entity' => FALSE,
],
'region' => 'content',
]);
}
// Campo Fotos.
if (!$view_display->getComponent('field_user_photos')) {
$view_display->setComponent('field_user_photos', [

View File

@@ -55,7 +55,7 @@ function site_users_entity_field_access($operation, FieldDefinitionInterface $fi
$profile_fields = [
'field_user_name',
'field_user_phone',
'field_user_category',
'field_user_bio',
];

View File

@@ -109,7 +109,7 @@ class UserInfoBlock extends BlockBase implements ContainerFactoryPluginInterface
'username' => $user->getDisplayName(),
'name' => $this->getFieldValue($user, 'field_user_name'),
'phone' => $this->getFieldValue($user, 'field_user_phone'),
'category' => $this->getFieldValue($user, 'field_user_category'),
'bio' => $this->getFieldValue($user, 'field_user_bio'),
'photo_url' => $default_photo_url,