diff --git a/CHANGELOG.md b/CHANGELOG.md index d8ed2b1..d9d663c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.28.0] - 2024-01-10 + +### Added +- Page::renderView() now accepts an array of options as second argument, behaving same as Page::render() when passed an array of options. + ## [0.27.1] - 2023-10-12 ### Changed diff --git a/Wireframe.info.json b/Wireframe.info.json index 707fcbd..b895527 100644 --- a/Wireframe.info.json +++ b/Wireframe.info.json @@ -1,7 +1,7 @@ { "title": "Wireframe", "summary": "Wireframe is an output framework for ProcessWire CMS/CMF.", - "version": "0.27.1", + "version": "0.28.0", "author": "Teppo Koivula", "href": "https://wireframe-framework.com", "requires": [ diff --git a/Wireframe.module.php b/Wireframe.module.php index 9807161..97546c5 100644 --- a/Wireframe.module.php +++ b/Wireframe.module.php @@ -14,7 +14,7 @@ * @method static string|Page|NullPage page($source, $args = []) Static getter (factory) method for Pages. * @method static string|null partial(string $partial_name, array $args = []) Static getter (factory) method for Partials. * - * @version 0.27.1 + * @version 0.28.0 * @author Teppo Koivula * @license Mozilla Public License v2.0 https://mozilla.org/MPL/2.0/ */ diff --git a/lib/Hooks.php b/lib/Hooks.php index 219a569..da932ee 100644 --- a/lib/Hooks.php +++ b/lib/Hooks.php @@ -10,7 +10,7 @@ * * @internal This class is only intended for use within the Wireframe internals. * - * @version 0.3.0 + * @version 0.4.0 * @author Teppo Koivula * @license Mozilla Public License v2.0 https://mozilla.org/MPL/2.0/ */ @@ -174,8 +174,8 @@ protected function pageRenderView(HookEvent $event) { $original_view = $event->object->_wireframe_view; $original_view_template = $event->object->_wireframe_view_template; $event->object->_wireframe_layout = ''; - $event->object->setView($event->arguments[0]); - $event->return = $event->object->render(); + $event->object->setView($event->arguments(0)); + $event->return = $event->object->render($event->arguments(1)); $event->object->_wireframe_layout = $original_layout; $event->object->_wireframe_view = $original_view; $event->object->_wireframe_view_template = $original_view_template;