Skip to content

Commit 88736da

Browse files
committed
Add support for options array to Page::renderView()
1 parent dc1ffc9 commit 88736da

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.28.0] - 2024-01-10
11+
12+
### Added
13+
- Page::renderView() now accepts an array of options as second argument, behaving same as Page::render() when passed an array of options.
14+
1015
## [0.27.1] - 2023-10-12
1116

1217
### Changed

Wireframe.info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title": "Wireframe",
33
"summary": "Wireframe is an output framework for ProcessWire CMS/CMF.",
4-
"version": "0.27.1",
4+
"version": "0.28.0",
55
"author": "Teppo Koivula",
66
"href": "https://wireframe-framework.com",
77
"requires": [

Wireframe.module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* @method static string|Page|NullPage page($source, $args = []) Static getter (factory) method for Pages.
1515
* @method static string|null partial(string $partial_name, array $args = []) Static getter (factory) method for Partials.
1616
*
17-
* @version 0.27.1
17+
* @version 0.28.0
1818
* @author Teppo Koivula <teppo@wireframe-framework.com>
1919
* @license Mozilla Public License v2.0 https://mozilla.org/MPL/2.0/
2020
*/

lib/Hooks.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @internal This class is only intended for use within the Wireframe internals.
1212
*
13-
* @version 0.3.0
13+
* @version 0.4.0
1414
* @author Teppo Koivula <teppo@wireframe-framework.com>
1515
* @license Mozilla Public License v2.0 https://mozilla.org/MPL/2.0/
1616
*/
@@ -174,8 +174,8 @@ protected function pageRenderView(HookEvent $event) {
174174
$original_view = $event->object->_wireframe_view;
175175
$original_view_template = $event->object->_wireframe_view_template;
176176
$event->object->_wireframe_layout = '';
177-
$event->object->setView($event->arguments[0]);
178-
$event->return = $event->object->render();
177+
$event->object->setView($event->arguments(0));
178+
$event->return = $event->object->render($event->arguments(1));
179179
$event->object->_wireframe_layout = $original_layout;
180180
$event->object->_wireframe_view = $original_view;
181181
$event->object->_wireframe_view_template = $original_view_template;

0 commit comments

Comments
 (0)