From 1bbcb209b195488365838e8290369918c69fb5c1 Mon Sep 17 00:00:00 2001 From: Zans Laksa Date: Mon, 19 Jul 2021 19:18:01 +0300 Subject: [PATCH] See scandipwa/scandipwa#2917 Implemented admin panel configuration section in order to manage layout direction for LTR and RTL --- .../Source/LayoutDirection.php | 33 +++++++++++++++++++ src/etc/adminhtml/system.xml | 1 + src/etc/adminhtml/system/layout-direction.xml | 26 +++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 src/Model/LayoutDirection/Source/LayoutDirection.php create mode 100644 src/etc/adminhtml/system/layout-direction.xml diff --git a/src/Model/LayoutDirection/Source/LayoutDirection.php b/src/Model/LayoutDirection/Source/LayoutDirection.php new file mode 100644 index 0000000..a9906bc --- /dev/null +++ b/src/Model/LayoutDirection/Source/LayoutDirection.php @@ -0,0 +1,33 @@ + 'ltr', 'label' => __('LTR')], + ['value' => 'rtl', 'label' => __('RTL')] + ]; + } +} diff --git a/src/etc/adminhtml/system.xml b/src/etc/adminhtml/system.xml index f4e3596..80cf874 100644 --- a/src/etc/adminhtml/system.xml +++ b/src/etc/adminhtml/system.xml @@ -17,5 +17,6 @@ + diff --git a/src/etc/adminhtml/system/layout-direction.xml b/src/etc/adminhtml/system/layout-direction.xml new file mode 100644 index 0000000..8fd8a5f --- /dev/null +++ b/src/etc/adminhtml/system/layout-direction.xml @@ -0,0 +1,26 @@ + + + +
+ + scandipwa + ScandiPWA_Customization::scandipwa_config + + + + Determines layout direction for LTR and RTL languages + + + + ScandiPWA\Customization\Model\LayoutDirection\Source\LayoutDirection + + +
+