Tags: golem15com/wn-cms-module
Tags
Add support for Behaviour default views (#1312) Co-authored-by: Marc Jauvin <marc.jauvin@gmail.com> Co-authored-by: Luke Towers <luke@luketowers.ca> Adds default views for the following backend controller behaviors: - FormController - ImportExportController - ListController - ReorderController `Backend\Classes\ControllerBehavior` will now automatically append their `views` folder to the controller's view paths allowing them to provide fallbacks for any views required by the behavior. The `create:controller` command will now no longer generate the views by default unless `--stubs` is also passed and the `--sidebar` flag is replaced with a `--layout=(standard|sidebar|fancy)` option to choose the form layout to use. Also: - Added `appendViewPath()` and `prependViewPath()` to the `System\Traits\ViewMaker`. `addViewPath` is renamed to `prependViewPath()` and is for paths that have higher priority than the existing paths while `appendViewPath()` is for paths that should have lower priority than the existing paths (i.e. fallbacks). - Backend controllers will now automatically set their navigation context in the form of `Author.Plugin` as the author, `$pluginName` as the main menu code, and `$controllerName` as the side menu code. This means that you can remove calls to `BackendMenu::setContext()` and constructor overrides in your controllers if they follow that convention. - Support for passing `new: true` as a parameter in the request body to `onSave()` calls that will return a redirect to the `create` action - `formMakePartial(string $partial, array $params = [])` to the `FormController` behavior that will render a partial through the controller's `makePartial` using the following priority list of contextual names: `form_$context_$partial`, `form_$partial`, `$partial`). - Support for `abort(403)` to return the access denied view in the backend - Improved handling of `abort(404)` in the backend - Improved styling of disabled fields in the fancy form layout - Improved styling of file generated / updated status message in scaffolding commands
Backport fb88e6fab to 1.1 * Harden theme objects, prevent certain properties from being passed through to ThemeData object * Improve and properly scope Twig security policy - Block methods that write, delete or modify records and attributes in Database/Eloquent and Halcyon models - Block access to theme datasource - Prevent extensions from being created or directly interacted with (models and properties provided to extended objects should still be OK) Refs: wintercms/winter@fb88e6f#diff-347d3e6f6f84697f5be048027169529a5ed7e782fcf2dcf62dcdbf560a0a4f77
Replace deprecated usage of ${} for string interpolation (#1032)
Credit to @josephcrowell
Replace deprecated usage of ${} for string interpolation (#1032)
Credit to @josephcrowell
PreviousNext