MDL-56536 tool_mobile: Add logos to the get_public_config WS

This commit is contained in:
Juan Leyva
2016-10-21 10:30:59 +01:00
parent 919b9dfabd
commit 5d5e30c64d
3 changed files with 22 additions and 3 deletions
+9 -1
View File
@@ -100,7 +100,7 @@ class api {
* @return array with the settings and warnings
*/
public static function get_public_config() {
global $CFG, $SITE, $PAGE;
global $CFG, $SITE, $PAGE, $OUTPUT;
$context = context_system::instance();
// We need this to make work the format text functions.
@@ -135,6 +135,14 @@ class api {
$url = new moodle_url("/$CFG->admin/tool/mobile/launch.php");
$settings['launchurl'] = $url->out(false);
}
if ($logourl = $OUTPUT->get_logo_url()) {
$settings['logourl'] = $logourl->out(false);
}
if ($compactlogourl = $OUTPUT->get_compact_logo_url()) {
$settings['compactlogourl'] = $compactlogourl->out(false);
}
return $settings;
}