Skip to content

Commit 4065ca5

Browse files
committed
Rename namespaces
1 parent 651f1b6 commit 4065ca5

20 files changed

Lines changed: 63 additions & 63 deletions

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424
- Add LokiCookies API and cookie notice
2525
- Add top links component
2626
- Add-to-cart for both PDP and PLP
27-
- Add any layout handle with `loki_theme_` prefix
27+
- Add any layout handle with `LokiTheme_LumaComponents_` prefix
2828
- Reuse `loki.alpinejs` block name
2929
- Obviously remove mage/calendar.css
3030
- Only add component definitions once
@@ -49,10 +49,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4949
- Failsafe to prevent error
5050
- Highlight selected menu
5151
- Alpine.js component for main navigation menu
52-
- Move component logic from Loki/luma to `Loki_Theme`
52+
- Move component logic from Loki/luma to `LokiTheme_LumaComponents`
5353
- Conditionally apply layout handles
5454
- Move theme config to separate config class
55-
- Move Alpine CSP and JS removal via layout to `Loki_Theme` module
55+
- Move Alpine CSP and JS removal via layout to `LokiTheme_LumaComponents` module
5656
- Move component definitions from constructor to DI XML
5757
- Move patterns and themes into DI XML
5858
- Only add x-title and HTML hints in Developer Mode

Config/Source/ThemePathOptions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types=1);
22

3-
namespace Loki\Theme\Config\Source;
3+
namespace LokiTheme\LumaComponents\Config\Source;
44

55
use Magento\Framework\App\Area;
66
use Magento\Framework\Data\OptionSourceInterface;

Config/ThemeConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace Loki\Theme\Config;
4+
namespace LokiTheme\LumaComponents\Config;
55

66
use Magento\Framework\App\Config\ScopeConfigInterface;
77
use Magento\Framework\View\DesignInterface;
@@ -16,7 +16,7 @@ public function __construct(
1616

1717
public function getThemes(): array
1818
{
19-
$themeNames = trim($this->scopeConfig->getValue('loki_theme/general/themes'));
19+
$themeNames = trim($this->scopeConfig->getValue('LokiTheme_LumaComponents/general/themes'));
2020
if (empty($themeNames)) {
2121
return [];
2222
}

Observer/AddAlpineComponents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php declare(strict_types=1);
22

3-
namespace Loki\Theme\Observer;
3+
namespace LokiTheme\LumaComponents\Observer;
44

5-
use Loki\Theme\Config\ThemeConfig;
5+
use LokiTheme\LumaComponents\Config\ThemeConfig;
66
use Magento\Framework\App\State as AppState;
77
use Magento\Framework\Event\Observer;
88
use Magento\Framework\Event\ObserverInterface;

Observer/AddBlockHints.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php declare(strict_types=1);
22

3-
namespace Loki\Theme\Observer;
3+
namespace LokiTheme\LumaComponents\Observer;
44

5-
use Loki\Theme\Config\ThemeConfig;
5+
use LokiTheme\LumaComponents\Config\ThemeConfig;
66
use Magento\Framework\App\State as AppState;
77
use Magento\Framework\Event\Observer;
88
use Magento\Framework\Event\ObserverInterface;

Observer/AddJsComponents.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php declare(strict_types=1);
22

3-
namespace Loki\Theme\Observer;
3+
namespace LokiTheme\LumaComponents\Observer;
44

5-
use Loki\Theme\Config\ThemeConfig;
5+
use LokiTheme\LumaComponents\Config\ThemeConfig;
66
use Magento\Framework\Event\Observer;
77
use Magento\Framework\Event\ObserverInterface;
88

Observer/ApplyLayoutHandles.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php declare(strict_types=1);
22

3-
namespace Loki\Theme\Observer;
3+
namespace LokiTheme\LumaComponents\Observer;
44

5-
use Loki\Theme\Config\ThemeConfig;
5+
use LokiTheme\LumaComponents\Config\ThemeConfig;
66
use Magento\Framework\Event\Observer;
77
use Magento\Framework\Event\ObserverInterface;
88
use Magento\Framework\View\LayoutInterface;
@@ -21,10 +21,10 @@ public function execute(Observer $observer): void
2121
return;
2222
}
2323

24-
$this->layout->getUpdate()->addHandle('loki_theme_remove_legacy_js');
24+
$this->layout->getUpdate()->addHandle('LokiTheme_LumaComponents_remove_legacy_js');
2525

2626
foreach ($this->layout->getUpdate()->getHandles() as $handle) {
27-
$this->layout->getUpdate()->addHandle('loki_theme_' . $handle);
27+
$this->layout->getUpdate()->addHandle('LokiTheme_LumaComponents_' . $handle);
2828
}
2929
}
3030
}

Observer/RemoveLegacyHtmlBindings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php declare(strict_types=1);
22

3-
namespace Loki\Theme\Observer;
3+
namespace LokiTheme\LumaComponents\Observer;
44

5-
use Loki\Theme\Config\ThemeConfig;
5+
use LokiTheme\LumaComponents\Config\ThemeConfig;
66
use Magento\Framework\Event\Observer;
77
use Magento\Framework\Event\ObserverInterface;
88

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# `Loki_Theme` module
1+
# `LokiTheme_LumaComponents` module
22
**Module for Magento 2 to remove legacy Luma JavaScript and adds JS components or Alpine.js components where needed**
33

44
## Installation
55
```bash
6-
composer require loki/magento2-theme
7-
bin/magento module:enable Loki_Theme
6+
composer require loki-theme/magento2-luma-components
7+
bin/magento module:enable LokiTheme_LumaComponents
88
```
99

1010
## What this is

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "loki/magento2-theme",
2+
"name": "loki-theme/magento2-luma-components",
33
"version": "0.0.7",
44
"description": "Module to allow for Loki Themes to work",
55
"type": "magento2-module",
@@ -18,7 +18,7 @@
1818
"registration.php"
1919
],
2020
"psr-4": {
21-
"Loki\\Theme\\": ""
21+
"LokiTheme\\LumaComponents\\": ""
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)