| @@ 15-25 (lines=11) @@ | ||
| 12 | foreach ($themeHandler->listInfo() as $themeName => $info) { |
|
| 13 | ||
| 14 | // Register twig routes as theme hooks. |
|
| 15 | if (isset($info->info['routes'])) { |
|
| 16 | foreach ($info->info['routes'] as $name => $route) { |
|
| 17 | $theme[$name] = [ |
|
| 18 | 'variables' => [ |
|
| 19 | 'graphql_arguments' => [], |
|
| 20 | 'graphql_route' => $name, |
|
| 21 | ], |
|
| 22 | 'function' => '_graphql_twig_missing_template', |
|
| 23 | ]; |
|
| 24 | } |
|
| 25 | } |
|
| 26 | ||
| 27 | // Register twig blocks as theme hooks. |
|
| 28 | if (isset($info->info['blocks'])) { |
|
| @@ 28-38 (lines=11) @@ | ||
| 25 | } |
|
| 26 | ||
| 27 | // Register twig blocks as theme hooks. |
|
| 28 | if (isset($info->info['blocks'])) { |
|
| 29 | foreach ($info->info['blocks'] as $name => $block) { |
|
| 30 | $theme[$name] = [ |
|
| 31 | 'variables' => [ |
|
| 32 | 'graphql_arguments' => [], |
|
| 33 | 'graphql_route' => $name, |
|
| 34 | ], |
|
| 35 | 'function' => '_graphql_twig_missing_template', |
|
| 36 | ]; |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||
| 40 | } |
|
| 41 | return $theme; |
|