Skip to content

Commit

Permalink
HSD8-1639: Uninstall and deprecate ECK (#1545)
Browse files Browse the repository at this point in the history
* HSD8-1639: Uninstall and deprecate ECK (#1545).
  • Loading branch information
joegl authored Aug 2, 2024
1 parent 706b9b4 commit f692327
Show file tree
Hide file tree
Showing 117 changed files with 2,271 additions and 1,973 deletions.
9 changes: 4 additions & 5 deletions config/default/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ module:
draggableviews: 0
dropzonejs: 0
dynamic_page_cache: 0
eck: 0
editor: 0
editor_advanced_link: 0
editoria11y: 0
Expand Down Expand Up @@ -275,12 +274,12 @@ module:
hs_admin: 1000
su_humsci_profile: 1000
theme:
claro: 0
gin: 0
su_humsci_gin_admin: 0
stanford_basic: 0
humsci_basic: 0
humsci_colorful: 0
humsci_traditional: 0
humsci_colorful: 0
claro: 0
gin: 0
su_humsci_gin_admin: 0
stable9: 0
profile: su_humsci_profile
1 change: 0 additions & 1 deletion config/default/eck.settings.yml

This file was deleted.

2 changes: 1 addition & 1 deletion config/default/views.view.hs_courses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- node.type.hs_course
module:
- datetime
- eck
- hs_entities
- hs_field_helpers
- hs_views_helper
- node
Expand Down
2 changes: 1 addition & 1 deletion config/default/views.view.hs_default_courses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
- taxonomy.vocabulary.hs_course_tags
module:
- datetime
- eck
- hs_entities
- hs_field_helpers
- hs_views_helper
- node
Expand Down
2 changes: 1 addition & 1 deletion config/default/views.view.hs_default_events.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
- node.type.hs_event
- taxonomy.vocabulary.hs_event_type
module:
- eck
- hs_entities
- entity_reference_exposed_filters
- hs_field_helpers
- node
Expand Down
2 changes: 1 addition & 1 deletion config/default/views.view.hs_default_manage_content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies:
- taxonomy.vocabulary.hs_publication_type
module:
- datetime
- eck
- hs_entities
- hs_field_helpers
- hs_migrate
- node
Expand Down
2 changes: 1 addition & 1 deletion config/default/views.view.hs_publications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
- taxonomy.vocabulary.hs_publication_type
module:
- datetime
- eck
- hs_entities
- hs_views_helper
- node
- stanford_media
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public function execute($entity = NULL) {
protected function duplicateEntity(ContentEntityInterface $entity) {
$duplicate_entity = $entity->createDuplicate();

// Loop through paragraph and eck fields to clone those entities.
// Loop through paragraph fields to clone those entities.
foreach ($this->getReferenceFields($entity->getEntityTypeId(), $entity->bundle()) as $field) {
foreach ($duplicate_entity->{$field->getName()} as $value) {
$value->entity = $this->duplicateEntity($value->entity);
Expand Down Expand Up @@ -275,12 +275,6 @@ protected function getFieldClonePlugins() {
protected function getReferenceFields($entity_type_id, $bundle) {
$fields = $this->entityFieldManager->getFieldDefinitions($entity_type_id, $bundle);

if ($this->entityTypeManager->hasDefinition('eck_entity_type')) {
$eck_types = $this->entityTypeManager->getStorage('eck_entity_type')
->loadMultiple();
$clone_target_types = array_keys($eck_types);
}

$clone_target_types[] = 'paragraph';
$clone_target_types[] = 'hs_entity';

Expand Down
12 changes: 0 additions & 12 deletions docroot/modules/humsci/hs_config_prefix/hs_config_prefix.module
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\eck\Entity\EckEntityType;
use Drupal\Core\Installer\InstallerKernel;

/**
Expand Down Expand Up @@ -88,17 +87,6 @@ function hs_config_prefix_entity_presave(EntityInterface $entity) {
'behavior_settings',
];

if (\Drupal::moduleHandler()->moduleExists('eck')) {
$eck_types = array_keys(EckEntityType::loadMultiple());

// ECK appends _type to the machine name of each entity type it has, so we
// have to do the same.
foreach ($eck_types as &$type) {
$type = "{$type}_type";
}
$exclude_config_types = array_merge($exclude_config_types, $eck_types);
}

if (!in_array($entity->getEntityTypeId(), $exclude_config_types)) {
try {
hs_config_prefix_set_entity_id($entity);
Expand Down

This file was deleted.

Loading

0 comments on commit f692327

Please sign in to comment.