From ba1795ef17bb706860cda705e35b66bb731c9ca2 Mon Sep 17 00:00:00 2001
From: "michael.daniel" <michael.danielczok@gmail.com>
Date: Fri, 9 Feb 2018 17:36:33 +0100
Subject: [PATCH] =?UTF-8?q?quiqqer/package-bricks#50=20fix:=20Bei=20=C3=A4?=
 =?UTF-8?q?lteren=20Slidern=20wird=20die=20alte=20Einstellung=20(checkbox)?=
 =?UTF-8?q?=20beachtet=20und=20konvertiert.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/QUI/Bricks/Controls/ContentSwitcher.php           |  6 ++++++
 .../Bricks/Controls/Slider/PromosliderWallpaper.php   | 11 +++++++++++
 2 files changed, 17 insertions(+)

diff --git a/src/QUI/Bricks/Controls/ContentSwitcher.php b/src/QUI/Bricks/Controls/ContentSwitcher.php
index 8a4f54a..cb752a5 100644
--- a/src/QUI/Bricks/Controls/ContentSwitcher.php
+++ b/src/QUI/Bricks/Controls/ContentSwitcher.php
@@ -46,10 +46,16 @@ public function getBody()
         $Engine  = QUI::getTemplateManager()->getEngine();
         $entries = $this->getAttribute('entries');
 
+        echo "<pre>";
+        var_dump($entries);
+        echo "</pre>";
+
         if (is_string($entries)) {
             $entries = json_decode($entries, true);
         }
 
+
+
         $Engine->assign(array(
             'this'    => $this,
             'entries' => $entries
diff --git a/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper.php b/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper.php
index 285f3e9..831fff9 100644
--- a/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper.php
+++ b/src/QUI/Bricks/Controls/Slider/PromosliderWallpaper.php
@@ -151,6 +151,17 @@ public function getBody()
             );
         }
 
+        // fallback for existed sliders (showarrows was a checkbox input)
+        switch ($this->getAttribute('showarrows')) {
+            case false:
+                echo "checkbox war false";
+                $this->setAttribute('showarrows', 'hide');
+                break;
+            case 1:
+                echo "checkbox war TRUE";
+                $this->setAttribute('showarrows', 'showHoverScale');
+                break;
+        }
         if ($this->getAttribute('showarrows')) {
             $this->setAttribute(
                 'data-qui-options-showarrows',
-- 
GitLab