From e7b98e29ad6eda24f3e6641c305c23250c71df16 Mon Sep 17 00:00:00 2001 From: Chris MacDonald <31731869+chrismacdonaldw@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:16:17 -0300 Subject: [PATCH 1/2] Bypass model validation from view. --- .../foxml/DgisStubNodesAlter.php | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/Plugin/dgi_migrate_alter/foxml/DgisStubNodesAlter.php diff --git a/src/Plugin/dgi_migrate_alter/foxml/DgisStubNodesAlter.php b/src/Plugin/dgi_migrate_alter/foxml/DgisStubNodesAlter.php new file mode 100644 index 0000000..fdcd2e1 --- /dev/null +++ b/src/Plugin/dgi_migrate_alter/foxml/DgisStubNodesAlter.php @@ -0,0 +1,43 @@ + 'default_value', + 'default_value' => 'http://purl.org/dc/dcmitype/Collection', + ], + [ + 'plugin' => 'dgi_migrate.required_entity_lookup', + 'bundle_key' => 'vid', + 'bundle' => 'islandora_models', + 'value_key' => 'field_external_uri', + 'entity_type' => 'taxonomy_term', + 'ignore_case' => TRUE, + ] + ]; + } +} From 4be533c66631f6230d3d052ef023cbd5d81622eb Mon Sep 17 00:00:00 2001 From: Chris MacDonald <31731869+chrismacdonaldw@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:20:48 -0300 Subject: [PATCH 2/2] Coding standards improvement. --- src/Plugin/dgi_migrate_alter/foxml/DgisStubNodesAlter.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Plugin/dgi_migrate_alter/foxml/DgisStubNodesAlter.php b/src/Plugin/dgi_migrate_alter/foxml/DgisStubNodesAlter.php index fdcd2e1..450c694 100644 --- a/src/Plugin/dgi_migrate_alter/foxml/DgisStubNodesAlter.php +++ b/src/Plugin/dgi_migrate_alter/foxml/DgisStubNodesAlter.php @@ -2,10 +2,8 @@ namespace Drupal\bcelndora\Plugin\dgi_migrate_alter\foxml; -use Drupal\Component\Utility\NestedArray; use Drupal\dgi_migrate_alter\Plugin\MigrationAlterBase; use Drupal\dgi_migrate_alter\Plugin\MigrationAlterInterface; -use Symfony\Component\Yaml\Yaml; /** * Alter for dgis_stub_nodes migration. @@ -37,7 +35,8 @@ public function alter(array &$migration) { 'value_key' => 'field_external_uri', 'entity_type' => 'taxonomy_term', 'ignore_case' => TRUE, - ] + ], ]; } + }