Skip to content

Commit

Permalink
Fix(Core): generate Dropdown before Container (#862)
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz authored Nov 26, 2024
1 parent 815ef13 commit 6472c78
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,15 @@ function plugin_fields_checkFiles()
// Clean all existing files
array_map('unlink', glob(PLUGINFIELDS_DOC_DIR . '/*/*'));

// Regenerate dropdowns
if ($DB->tableExists(PluginFieldsField::getTable())) {
$fields_obj = new PluginFieldsField();
$fields = $fields_obj->find(['type' => 'dropdown']);
foreach ($fields as $field) {
PluginFieldsDropdown::create($field);
}
}

// Regenerate containers
if ($DB->tableExists(PluginFieldsContainer::getTable())) {
$container_obj = new PluginFieldsContainer();
Expand All @@ -275,14 +284,6 @@ function plugin_fields_checkFiles()
}
}

// Regenerate dropdowns
if ($DB->tableExists(PluginFieldsField::getTable())) {
$fields_obj = new PluginFieldsField();
$fields = $fields_obj->find(['type' => 'dropdown']);
foreach ($fields as $field) {
PluginFieldsDropdown::create($field);
}
}
}

function plugin_fields_exportBlockAsYaml($container_id = null)
Expand Down

0 comments on commit 6472c78

Please sign in to comment.