MDL-84300 core: Support nested templates in routed API
This commit is contained in:
@@ -44,7 +44,7 @@ class templates {
|
||||
* @return payload_response
|
||||
*/
|
||||
#[route(
|
||||
path: '/templates/{themename}/{component}/{identifier}',
|
||||
path: '/templates/{themename}/{component}/{identifier:.*}',
|
||||
method: ['GET'],
|
||||
title: 'Fetch a single template',
|
||||
description: 'Fetch a single template for a component in a theme',
|
||||
|
||||
@@ -64,7 +64,17 @@ final class templates_test extends route_testcase {
|
||||
['core/modal'],
|
||||
[],
|
||||
],
|
||||
'foo' => [
|
||||
'fetch nested template' => [
|
||||
'boost/core/local/modal/alert',
|
||||
[
|
||||
'core/local/modal/alert',
|
||||
'core/modal',
|
||||
],
|
||||
[
|
||||
'moodle/ok',
|
||||
],
|
||||
],
|
||||
'multiple templates' => [
|
||||
'boost/core/notification',
|
||||
[
|
||||
'core/notification',
|
||||
|
||||
Reference in New Issue
Block a user