-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from zans-laksa/2917-ltr-rtl-switch
LTR / RTL Switch BE
- Loading branch information
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* @category ScandiPWA | ||
* @package ScandiPWA\Customization | ||
* @copyright Copyright (c) 2015 Scandiweb, Ltd (http://scandiweb.com) | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
|
||
namespace ScandiPWA\Customization\Model\LayoutDirection\Source; | ||
|
||
use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource; | ||
use Magento\Framework\Exception\NoSuchEntityException; | ||
|
||
/** | ||
* Class LayoutDirection | ||
* @package ScandiPWA\Customization\Model\LayoutDirection\Source | ||
*/ | ||
class LayoutDirection extends AbstractSource | ||
{ | ||
/** | ||
* Retrieve All options | ||
* | ||
* @return array | ||
* @throws NoSuchEntityException | ||
*/ | ||
public function getAllOptions() | ||
{ | ||
return [ | ||
['value' => 'ltr', 'label' => __('LTR')], | ||
['value' => 'rtl', 'label' => __('RTL')] | ||
]; | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* @category ScandiPWA | ||
* @package ScandiPWA\Customization | ||
* @copyright Copyright (c) 2015 Scandiweb, Ltd (http://scandiweb.com) | ||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) | ||
*/ | ||
--> | ||
<include xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_include.xsd"> | ||
<section id="layout_direction_configuration" translate="label" type="text" sortOrder="1000" showInDefault="1" showInWebsite="0" showInStore="0"> | ||
<label>Layout direction</label> | ||
<tab>scandipwa</tab> | ||
<resource>ScandiPWA_Customization::scandipwa_config</resource> | ||
|
||
<group id="layout_direction_section" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> | ||
<label>Layout Direction Configuration</label> | ||
<comment>Determines layout direction for LTR and RTL languages</comment> | ||
|
||
<field id="layout_direction" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0"> | ||
<label>Layout Direction</label> | ||
<source_model>ScandiPWA\Customization\Model\LayoutDirection\Source\LayoutDirection</source_model> | ||
</field> | ||
</group> | ||
</section> | ||
</include> |