From bb26e60d0df4b45228850d80a5b75b588df86cf6 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 8 Feb 2020 20:52:59 +0200 Subject: [PATCH] Updated platforms config --- app/config/platforms.php | 5 +++++ app/views/layouts/default.phtml | 13 ++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/config/platforms.php b/app/config/platforms.php index 484cbba8b1..ed1d9271d1 100644 --- a/app/config/platforms.php +++ b/app/config/platforms.php @@ -12,6 +12,7 @@ const APP_PLATFORM_CONSOLE = 'console'; return [ APP_PLATFORM_WEB => [ + 'key' => APP_PLATFORM_WEB, 'name' => 'Web', 'description' => 'Client libraries for integrating with '.APP_NAME.' to build web-based applications and websites. Read the [getting started for web](/docs/getting-started-for-web) tutorial to start building your first web application.', 'enabled' => true, @@ -48,6 +49,7 @@ return [ ], APP_PLATFORM_IOS => [ + 'key' => APP_PLATFORM_IOS, 'name' => 'iOS', 'description' => 'Client libraries for integrating with '.APP_NAME.' to build iOS applications. Read the [getting started for iOS](/docs/getting-started-for-ios) tutorial to start building your first iOS application.', 'enabled' => false, @@ -83,6 +85,7 @@ return [ ], APP_PLATFORM_ANDROID => [ + 'key' => APP_PLATFORM_ANDROID, 'name' => 'Android', 'description' => 'Client libraries for integrating with '.APP_NAME.' to build Android applications. Read the [getting started for Android](/docs/getting-started-for-android) tutorial to start building your first Android application.', 'enabled' => false, @@ -118,6 +121,7 @@ return [ ], APP_PLATFORM_FLUTTER => [ + 'key' => APP_PLATFORM_FLUTTER, 'name' => 'Flutter', 'description' => 'Client libraries for integrating with '.APP_NAME.' to build cross-platform Flutter applications. Read the [getting started for Flutter](/docs/getting-started-for-flutter) tutorial to start building your first Flutter application.', 'enabled' => false, @@ -163,6 +167,7 @@ return [ // ], APP_PLATFORM_SERVER => [ + 'key' => APP_PLATFORM_SERVER, 'name' => 'Server', 'description' => 'Libraries for integrating with '.APP_NAME.' to build server side integrations. Read the [getting started for server](/docs/getting-started-for-server) tutorial to start building your first server integration.', 'enabled' => true, diff --git a/app/views/layouts/default.phtml b/app/views/layouts/default.phtml index ffad883b42..575744d1c2 100644 --- a/app/views/layouts/default.phtml +++ b/app/views/layouts/default.phtml @@ -14,9 +14,16 @@ $canonical = $this->getParam('canonical', ''); if(!empty($platforms)) { $platforms = array_map(function($platform) { - return array_map(function($language) { - return $language['key']; - }, $platform['languages']); + return [ + 'key' => $platform['key'], + 'name' => $platform['name'], + 'langauges' => array_map(function($language) { + return [ + 'key' => $language['key'], + 'name' => $language['name'], + ]; + }, $platform['languages']) + ]; }, $platforms); }