Skip to content

Commit

Permalink
Revert "Added new field subgroup from tpr to the units."
Browse files Browse the repository at this point in the history
This reverts commit be1fcb0.
  • Loading branch information
dire committed Nov 13, 2023
1 parent 571f4b5 commit 42eed9b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 103 deletions.
19 changes: 0 additions & 19 deletions helfi_tpr.install
Original file line number Diff line number Diff line change
Expand Up @@ -300,22 +300,3 @@ function helfi_tpr_update_8045() : void {
\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('topical', 'tpr_unit', 'helfi_tpr', $topical_field);
}

/**
* UHF-9159 Add SUBGROUP field to Unit entity.
*/
function helfi_tpr_update_8046() : void {
$subgroup_field = BaseFieldDefinition::create('tpr_connection')
->setLabel(new TranslatableMarkup('Subgroup', [], ['context' => 'TPR Unit field label']))
->setDescription(new TranslatableMarkup('The "SUBGROUP" connection type'))
->setTranslatable(TRUE)
->setCardinality(BaseFieldDefinition::CARDINALITY_UNLIMITED)
->setDisplayOptions('form', [
'type' => 'readonly_field_widget',
])
->setDisplayConfigurable('form', TRUE)
->setDisplayConfigurable('view', TRUE);

\Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('subgroup', 'tpr_unit', 'helfi_tpr', $subgroup_field);
}
12 changes: 0 additions & 12 deletions migrations/tpr_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,6 @@ process:
value: value
data: data
type: type
_subgroup_connections:
plugin: array_element_equals
source: connections
value: SUBGROUP
key: type
subgroup:
plugin: sub_process
source: '@_subgroup_connections'
process:
value: value
data: data
type: type
_contacts_connections:
plugin: array_element_equals
source: connections
Expand Down
4 changes: 0 additions & 4 deletions src/Entity/Unit.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,6 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) :
'description' => 'TOPICAL',
'label' => new TranslatableMarkup('Topical', [], ['context' => 'TPR Unit field label']),
],
'subgroup' => [
'description' => 'SUBGROUP',
'label' => new TranslatableMarkup('Subgroup', [], ['context' => 'TPR Unit field label']),
],
];

foreach ($connectionFields as $name => $data) {
Expand Down
1 change: 0 additions & 1 deletion src/Field/Connection/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ final class Repository {
Link::TYPE_NAME => Link::class,
PhoneOrEmail::TYPE_NAME => PhoneOrEmail::class,
Topical::TYPE_NAME => Topical::class,
Subgroup::TYPE_NAME => Subgroup::class,
];

/**
Expand Down
67 changes: 0 additions & 67 deletions src/Field/Connection/Subgroup.php

This file was deleted.

0 comments on commit 42eed9b

Please sign in to comment.