Created
December 11, 2018 15:35
-
-
Save lucalanca/36954d31f7058f2c64cbe1b1a0b5e4b1 to your computer and use it in GitHub Desktop.
Load all cockpit descriptions at once
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /config/api/public/singletons.php | |
# GET /api/public/singletons | |
# GET /api/public/singletons?lang=de | |
<?php | |
$options = []; | |
$response = []; | |
if ($lang = $this->param('lang', false)) $options['lang'] = $lang; | |
foreach ($this->module('singletons')->singletons() as $name => $singleton) { | |
$response[$name] = $this->module('singletons')->getData($name, $options); | |
} | |
return $response; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment