Skip to content

Commit 84a1786

Browse files
authored
How to have your bundle get loaded after a legacy module (#285)
1 parent 9fa392f commit 84a1786

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/dev/framework/manager-plugin.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,18 @@ class Plugin implements BundlePluginInterface
176176
return [
177177
BundleConfig::create(KnpMenuBundle::class)
178178
->setLoadAfter([ContaoCoreBundle::class]),
179+
180+
// In case you also need your bundle to be loaded after a legacy
181+
// style module that resides in system/modules, you can just use
182+
// its name as string:
183+
// ->setLoadAfter([ContaoCoreBundle::class, 'legacy_module_name']),
184+
185+
// Speaking about legacy modules:
186+
// In case your bundle replaces an old legacy module, you can indicate
187+
// this to the plugin loader.
188+
// This will enable other legacy modules to be still loaded after your
189+
// newly created bundle in case they require this to work properly.
190+
// ->setReplace(['old_module_name']),
179191
];
180192
}
181193
}

0 commit comments

Comments
 (0)