11<?php
22declare (strict_types=1 );
33
4- namespace SimpleSAML \Module \mymodule ;
4+ namespace SimpleSAML \Module \themevanilla \ Controller ;
55
6- use SimpleSAML \Configuration ;
7- use SimpleSAML \Session ;
6+ use SimpleSAML \{Configuration , Logger , Session };
87use Twig \Environment ;
98use SimpleSAML \XHTML \TemplateControllerInterface ;
109
@@ -13,20 +12,20 @@ class VanillaThemeController implements TemplateControllerInterface
1312 /** @var \SimpleSAML\Configuration */
1413 protected Configuration $ themeconfig ;
1514
15+ /**
16+ * @var \SimpleSAML\Logger|string
17+ * @psalm-var \SimpleSAML\Logger|class-string
18+ */
19+ protected $ logger = Logger::class;
20+
1621 /**
1722 * Controller constructor.
1823 *
1924 * It initializes the global configuration and auth source configuration for the controllers implemented here.
2025 *
21- * @param \SimpleSAML\Configuration $config The configuration to use by the controllers.
22- * @param \SimpleSAML\Session $session The session to use by the controllers.
23- *
2426 * @throws \Exception
2527 */
26- public function __construct (
27- protected Configuration $ config ,
28- protected Session $ session
29- ) {
28+ public function __construct () {
3029 $ this ->themeconfig = Configuration::getConfig ('module_themevanilla.php ' );
3130 }
3231
@@ -50,6 +49,10 @@ public function setUpTwig(Environment &$twig): void
5049 */
5150 public function display (array &$ data ): void
5251 {
53- $ data ['config ' ] = $ this ->themeconfig ;
52+ $ data ['config ' ] = $ this ->themeconfig ->toArray () ?? [];
53+
54+ $ this ->logger ::debug (
55+ __METHOD__ . "::config data: " . var_export ($ data ['config ' ], true )
56+ );
5457 }
5558}
0 commit comments