I'm expanding my Craft website with a small Module, internal to this project. The module currently only defines a new input-field (extending craft\base\Field
).
I have dumped the autoloader from composer and my config/app.php
only contains the registration of this module:
<?php
return [
'modules' => [
'simple-markdown-editor' => [
'class' => \codeisland\simplemde\MarkdownModule::class,
],
],
'bootstrap' => ['simple-markdown-editor'],
];
This setup works and the new field shows up in the Admin CP. But: as far as I understand the bootstrap
-entry, it's only needed if the module needs to be executed on every page render. The Craft documentation says as much:
TIP: If your module doesn’t need to get loaded on every request, you can remove its ID from the bootstrap array.
Since the module only defines an input-field for the Admin CP, it doesn't need to be loaded on every request. But if I remove it from the bootstrap
-array, it's not loaded at all.
Do I need to add additional config? Or am I just misunderstanding the documentation?