Skip to content

Commit

Permalink
Add options to getTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
teppokoivula committed Nov 2, 2023
1 parent 93e152a commit 0bcc9f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.1.1] - 2023-11-02

### Fixed
- Restored options array for ___getTemplate() params.

## [1.1.0] - 2023-11-02

### Added
Expand Down
2 changes: 1 addition & 1 deletion MarkupMenu.info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "MarkupMenu",
"summary": "MarkupMenu is a module for generating menu markup.",
"version": "1.1.0",
"version": "1.1.1",
"author": "Teppo Koivula",
"href": "https://github.com/teppokoivula/MarkupMenu",
"requires": [
Expand Down
4 changes: 2 additions & 2 deletions MarkupMenu.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* MarkupMenu is a module for generating menu markup. See README.md for more details.
* Some ideas and code in this module are based on the Markup Simple Navigation module.
*
* @version 1.1.0
* @version 1.1.1
* @author Teppo Koivula <[email protected]>
* @license Mozilla Public License v2.0 http://mozilla.org/MPL/2.0/
*/
Expand Down Expand Up @@ -428,7 +428,7 @@ protected function getPage($source = null, $default = null): ?Page {
* @param array $placeholders Array of placeholders for string replacements
* @return string Template
*/
protected function ___getTemplate($template_name, ?WireData $item = null, array $placeholders = []): string {
protected function ___getTemplate($template_name, ?WireData $item = null, array $options = [], array $placeholders = []): string {
$template = $options['templates'][$template_name];
return is_callable($template) ? $template($item, $options, $placeholders) : $template;
}
Expand Down

0 comments on commit 0bcc9f7

Please sign in to comment.