Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 46f29b35 authored by Andreas Hennings's avatar Andreas Hennings
Browse files

OEL-1281: Rename variables $field_name(s) -> $legacy_field_name(s).

parent 5526a4c1
No related branches found
No related tags found
5 merge requests!121OEL-1421: Fix cosmetic changes.,!116OEL-1394: Merge 1.x into EPIC-1293-Project, align with new version of card:search pattern,!115Upate the EPIC-1293-project,!105EPIC: OEL-1255: Migrate paragraphs,!97[OEL-1255] OEL-1281: Upgrade path from oe_bootstrap_theme_paragraphs
......@@ -181,11 +181,11 @@ function _oe_whitelabel_paragraphs_install_migrate_field_data(array $field_names
* Legacy field names, indexed by paragraph type and destination field name.
*/
function _oe_whitelabel_paragraphs_install_drop_legacy_fields(array $field_names_by_bundle): void {
foreach ($field_names_by_bundle as $bundle => $field_names) {
foreach ($field_names as $field_name) {
$field_config = FieldConfig::loadByName('paragraph', $bundle, $field_name);
foreach ($field_names_by_bundle as $bundle => $legacy_field_names) {
foreach ($legacy_field_names as $legacy_field_name) {
$field_config = FieldConfig::loadByName('paragraph', $bundle, $legacy_field_name);
if ($field_config === NULL) {
throw new \RuntimeException("Legacy field 'paragraph.$bundle.$field_name' not found.");
throw new \RuntimeException("Legacy field 'paragraph.$bundle.$legacy_field_name' not found.");
}
$field_config->delete();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment