If you need to use the CMS Controller's Twig instance then you should call getTwig() directly on the controller instance instead of relying upon twig.environment.cms being a singleton.
It being a singleton causes issues if for some reason you want to render another route in the same request as the second call to Controller->run() will pollute the variables of the first.
This fixes#578 by adding the ability to pass the CMS Controller instance to the CMS Twig Extension removing the reliance on context variables as well as making the expected "global" twig variables inside of the CMS Twig environment actually global within that environment.
Replaces #598 & #593.
Credit to @RomainMazB for the initial implementation.
This splits the testing suite into the separate modules as appropriate in order to improve the reliability of the testing suite as a whole and make it easier for developers to have an up to date testing suite from the core to build off of. Additionally the tests are now namespaced and some minor improvements to the PluginManager were made.
Now the PluginManager will internally treat plugin identifiers as lower case strings, only transforming them to their normalized versions when requested by methods like getPlugins() & getAllPlugins(). The idea behind this is that it provides a much simpler way to internally handle checking, especially for plugin replacement where casing could cause issues.
Replaces #576. Fixes#575.
- Copied restructure from the "wip/inspector-rewrite" branch.
- Added manifest and vendor files in "{% snowboard %}" tag.
- Used standard Mix config path to auto-register the module.
- Added events "flash.create" and "flash.remove" triggered when flash messages are created and removed
- Added URL utility into Snowboard core to handle URL generation and base URL detection
- Added base URL in Twig tag
- Updated Stylesheet Loader to use base URL when injecting extras CSS
The above commit prevented components within a partial from populating their own parameters into the template. This partially reverts the change but still allows the main partial being rendered to override the variables if needed.
Fixes an issue where if the underlying data behind a datasource changes through manual intervention (either in the database or the filesystem) before running theme:sync it wasn't being detected by the theme:sync command.
This PR add a `multiple` property to fields in [theme customization](https://wintercms.com/docs/themes/development#customization).
If `multiple: true`, the field is added to `attachMany` and allow multiple files selection, in all other cases the current behaviour is applied.
Follow up to ec03b7b2f8, this allows any changes to $this->vars made within the Partial's PHP code section to persist to when the partial content is actually rendered.